aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-socks.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-06-10 18:28:22 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-06-10 18:28:22 +0000
commitfdb5b1af02573c18ed69561b5df37c28d52745c1 (patch)
treee65858f3d7c94418724c01ed7fcaf69e7272738f /epan/dissectors/packet-socks.c
parent7cae4a40d04a764d206bc9202a80b384a0ad920b (diff)
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-socks.c')
-rw-r--r--epan/dissectors/packet-socks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-socks.c b/epan/dissectors/packet-socks.c
index 3d7e04ffe9..d0b12afcbc 100644
--- a/epan/dissectors/packet-socks.c
+++ b/epan/dissectors/packet-socks.c
@@ -379,7 +379,7 @@ socks_udp_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
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 */
hash_info = conversation_get_proto_data(conversation, proto_socks);
@@ -438,7 +438,7 @@ new_udp_conversation( socks_hash_entry_t *hash_info, packet_info *pinfo){
conversation_t *conversation = conversation_new( pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_UDP,
hash_info->udp_port, hash_info->port, 0);
- g_assert( conversation);
+ DISSECTOR_ASSERT( conversation);
conversation_add_proto_data(conversation, proto_socks, hash_info);
conversation_set_dissector(conversation, socks_udp_handle);