summaryrefslogtreecommitdiff
path: root/packet-wap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-11-14 01:27:34 +0000
committerGuy Harris <guy@alum.mit.edu>2003-11-14 01:27:34 +0000
commitdd0328736b0406c56ba366cc8a7e86f8565cc0ae (patch)
treeaa94314e7c5f45b32f1af2dc959d622e63d7337c /packet-wap.c
parenta6d31930abfeb3d90a926b6414923a8f953821fa (diff)
downloadwireshark-dd0328736b0406c56ba366cc8a7e86f8565cc0ae.tar.gz
From Olivier Biot: fix the debugging output of "tvb_get_guintvar()".
svn path=/trunk/; revision=8961
Diffstat (limited to 'packet-wap.c')
-rw-r--r--packet-wap.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/packet-wap.c b/packet-wap.c
index 79ffdbea71..7a7d069f6f 100644
--- a/packet-wap.c
+++ b/packet-wap.c
@@ -2,7 +2,7 @@
*
* Utility routines for WAP dissectors
*
- * $Id: packet-wap.c,v 1.7 2002/08/28 21:00:37 jmayer Exp $
+ * $Id: packet-wap.c,v 1.8 2003/11/14 01:27:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -50,19 +50,17 @@ tvb_get_guintvar (tvbuff_t *tvb, guint offset, guint *octetCount)
guint counter = 0;
char cont = 1;
+#ifdef DEBUG
if (octetCount != NULL)
{
-#ifdef DEBUG
- fprintf (stderr, "dissect_wsp: Starting tvb_get_guintvar at offset %d, count=NULL\n", offset);
-#endif
+ fprintf (stderr, "dissect_wap: Starting tvb_get_guintvar at offset %d, count=%d\n", offset, *octetCount);
/* counter = *octetCount; */
}
else
{
-#ifdef DEBUG
- fprintf (stderr, "dissect_wsp: Starting tvb_get_guintvar at offset %d, count=%d\n", offset, *octetCount);
-#endif
+ fprintf (stderr, "dissect_wap: Starting tvb_get_guintvar at offset %d, count=NULL\n", offset);
}
+#endif
while (cont != 0)
{
@@ -72,7 +70,7 @@ tvb_get_guintvar (tvbuff_t *tvb, guint offset, guint *octetCount)
value += (octet & 0x7F);
cont = (octet & 0x80);
#ifdef DEBUG
- fprintf (stderr, "dissect_wsp: octet is %d (0x%02x), count=%d, value=%d, cont=%d\n", octet, octet, counter, value, cont);
+ fprintf (stderr, "dissect_wap: computing: octet is %d (0x%02x), count=%d, value=%d, cont=%d\n", octet, octet, counter, value, cont);
#endif
}
@@ -80,7 +78,7 @@ tvb_get_guintvar (tvbuff_t *tvb, guint offset, guint *octetCount)
{
*octetCount = counter;
#ifdef DEBUG
- fprintf (stderr, "dissect_wsp: Leaving tvb_get_guintvar count=%d\n", *octetCount);
+ fprintf (stderr, "dissect_wap: Leaving tvb_get_guintvar count=%d, value=%u\n", *octetCount, value);
#endif
}