From d85f804b4b6ced4271ae4ec9b6f46728a4388266 Mon Sep 17 00:00:00 2001 From: Gilbert Ramirez Date: Sun, 12 Dec 1999 05:11:57 +0000 Subject: Add the who protocol (rwho/rwhod/ruptime) In packet_hex_print(), compute (bstart + blen) only once. In time_secs_to_str(), return a meaningful string when time == 0, instead of returing pointer to char buffer with old, inappropriate data in it. svn path=/trunk/; revision=1297 --- packet.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'packet.c') diff --git a/packet.c b/packet.c index d4dbc57233..5ffb41e656 100644 --- a/packet.c +++ b/packet.c @@ -1,7 +1,7 @@ /* packet.c * Routines for packet disassembly * - * $Id: packet.c,v 1.58 1999/12/02 01:33:55 guy Exp $ + * $Id: packet.c,v 1.59 1999/12/12 05:11:45 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -190,6 +190,11 @@ time_secs_to_str(guint32 time) cur = &str[0][0]; } + if (time == 0) { + sprintf(cur, "0 time"); + return cur; + } + secs = time % 60; time /= 60; mins = time % 60; -- cgit v1.2.3