aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bittorrent.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-bittorrent.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-bittorrent.c')
-rw-r--r--epan/dissectors/packet-bittorrent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c
index 1bf7c97760..a544a354e8 100644
--- a/epan/dissectors/packet-bittorrent.c
+++ b/epan/dissectors/packet-bittorrent.c
@@ -223,7 +223,7 @@ static gboolean test_bittorrent_packet (tvbuff_t *tvb, packet_info *pinfo,
conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
- g_assert(find_dissector("bittorrent"));
+ DISSECTOR_ASSERT(find_dissector("bittorrent"));
conversation_set_dissector(conversation, find_dissector("bittorrent"));