diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-06-10 18:28:22 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-06-10 18:28:22 +0000 |
commit | fdb5b1af02573c18ed69561b5df37c28d52745c1 (patch) | |
tree | e65858f3d7c94418724c01ed7fcaf69e7272738f /epan/dissectors/packet-msproxy.c | |
parent | 7cae4a40d04a764d206bc9202a80b384a0ad920b (diff) | |
download | wireshark-fdb5b1af02573c18ed69561b5df37c28d52745c1.tar.gz |
just to get things straight: a dissector should *never* do any g_assert() calls!
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED()
this will replace application crash by showing a dissector bug, which is the desired behaviour
there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too
one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain.
svn path=/trunk/; revision=14608
Diffstat (limited to 'epan/dissectors/packet-msproxy.c')
-rw-r--r-- | epan/dissectors/packet-msproxy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-msproxy.c b/epan/dissectors/packet-msproxy.c index c69edf9e68..2b0c2d0fc9 100644 --- a/epan/dissectors/packet-msproxy.c +++ b/epan/dissectors/packet-msproxy.c @@ -206,7 +206,7 @@ static void msproxy_sub_dissector( tvbuff_t *tvb, packet_info *pinfo, conversation = find_conversation( pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0); - g_assert( conversation); /* should always find a conversation */ + DISSECTOR_ASSERT( conversation); /* should always find a conversation */ redirect_info = conversation_get_proto_data(conversation, proto_msproxy); |