aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-jxta.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-06-10 18:28:22 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2005-06-10 18:28:22 +0000
commitbdcce227e42ad0bfbef2f7ed1a5503db812b9dc0 (patch)
treee65858f3d7c94418724c01ed7fcaf69e7272738f /epan/dissectors/packet-jxta.c
parent577d2336bf389b6b2bdd6dee5a357ef3d5c66dcb (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14608 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-jxta.c')
-rw-r--r--epan/dissectors/packet-jxta.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c
index 5691de8b43..089086dae3 100644
--- a/epan/dissectors/packet-jxta.c
+++ b/epan/dissectors/packet-jxta.c
@@ -390,7 +390,7 @@ static int dissect_jxta_udp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tr
conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
}
- g_assert(find_dissector("jxta.udp"));
+ DISSECTOR_ASSERT(find_dissector("jxta.udp"));
conversation_set_dissector(conversation, find_dissector("jxta.udp"));
@@ -486,7 +486,7 @@ static int dissect_jxta_udp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tr
proto_item_set_end(jxta_udp_tree_item, tvb, tree_offset);
- g_assert(offset == tree_offset);
+ DISSECTOR_ASSERT(offset == tree_offset);
}
/* FIXME Could be a partially filled in jxta_stream_conversation_data object */
@@ -959,7 +959,7 @@ static int dissect_jxta_message_framing(tvbuff_t * tvb, packet_info * pinfo, pro
proto_item_set_end(framing_tree_item, tvb, tree_offset);
- g_assert(offset == tree_offset);
+ DISSECTOR_ASSERT(offset == tree_offset);
}
/* return how many bytes we used up. */
@@ -1150,7 +1150,7 @@ static int dissect_jxta_message(tvbuff_t * tvb, packet_info * pinfo, proto_tree
proto_item_set_end(jxta_msg_tree_item, tvb, tree_offset);
- g_assert(tree_offset == offset);
+ DISSECTOR_ASSERT(tree_offset == offset);
}
if ((offset > 0) && (AT_STRINGZ == pinfo->src.type) && (AT_STRINGZ == pinfo->dst.type)) {
@@ -1440,7 +1440,7 @@ static int dissect_jxta_message_element(tvbuff_t * tvb, packet_info * pinfo, pro
proto_item_set_end(jxta_elem_tree_item, tvb, tree_offset);
- g_assert(tree_offset == offset);
+ DISSECTOR_ASSERT(tree_offset == offset);
}
return offset;