diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-10-15 03:54:05 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-10-15 03:54:05 +0000 |
commit | a7592d7e5b8a3fe1afbdd080c7ae38a3dfbeae69 (patch) | |
tree | 50f7e09720792d28a840b12f78e3a4d5474906cb | |
parent | 086896c241a556e36e80ac69e031a12175d8e596 (diff) |
Fixes from Steffen Weinreich:
fix the processing of the month and year fields in the SCTC
Timestamp (the month is 1-origin, so subtract 1 from it before
putting it in "tm_mon", which is 0-origin; the year is a 2-digit
field that is, at least, Y2K-safe (but Y2.1K-unsafe), so if it's
less than 90, assume it's in the 21st century);
UCP OT 50-57 messages have a fixed number of fields and a
special handling of the MT is not necessary, so get rid of that.
Also, fix a typo in a comment.
svn path=/trunk/; revision=4030
-rw-r--r-- | AUTHORS | 4 | ||||
-rw-r--r-- | doc/ethereal.pod.template | 1 | ||||
-rw-r--r-- | packet-ucp.c | 12 |
3 files changed, 13 insertions, 4 deletions
@@ -823,6 +823,10 @@ Georg von Zezschwitz <gvz[AT]2scale.net> { Put URL of WSP GET/POST in the Info column } +Steffen Weinreich <steve[AT]weinreich.org> { + UCP fixes +} + Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to give his permission to use his version of snprintf.c. diff --git a/doc/ethereal.pod.template b/doc/ethereal.pod.template index 4a6e88d5bf..fab4dc3d6a 100644 --- a/doc/ethereal.pod.template +++ b/doc/ethereal.pod.template @@ -1165,6 +1165,7 @@ B<http://www.ethereal.com>. Graeme Hewson <graeme.hewson[AT]oracle.com> Pasi Eronen <pasi.eronen[at]nixu.com> Georg von Zezschwitz <gvz[AT]2scale.net> + Steffen Weinreich <steve[AT]weinreich.org> Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to give his permission to use his version of snprintf.c. diff --git a/packet-ucp.c b/packet-ucp.c index 6a841fbd29..21ab8683fd 100644 --- a/packet-ucp.c +++ b/packet-ucp.c @@ -2,7 +2,7 @@ * Routines for Universal Computer Protocol dissection * Copyright 2001, Tom Uijldert <tom.uijldert@cmg.nl> * - * $Id: packet-ucp.c,v 1.3 2001/10/08 17:42:18 guy Exp $ + * $Id: packet-ucp.c,v 1.4 2001/10/15 03:54:04 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -670,8 +670,10 @@ ucp_mktime(char *datestr) struct tm r_time; r_time.tm_mday = 10 * (datestr[0] - '0') + (datestr[1] - '0'); - r_time.tm_mon = 10 * (datestr[2] - '0') + (datestr[3] - '0'); + r_time.tm_mon = (10 * (datestr[2] - '0') + (datestr[3] - '0')) - 1; r_time.tm_year = 10 * (datestr[4] - '0') + (datestr[5] - '0'); + if (r_time.tm_year < 90) + r_time.tm_year += 100; r_time.tm_hour = 10 * (datestr[6] - '0') + (datestr[7] - '0'); r_time.tm_min = 10 * (datestr[8] - '0') + (datestr[9] - '0'); if (datestr[10]) @@ -680,7 +682,7 @@ ucp_mktime(char *datestr) } /*! - * Scanning rouines to add standard types (byte, int, string, data) + * Scanning routines to add standard types (byte, int, string, data) * to the protocol-tree. Each field is seperated with a slash ('/'). * * \param tree The protocol tree to add to @@ -1446,7 +1448,9 @@ add_5xO(proto_tree *tree, tvbuff_t *tvb) UcpHandleByte(hf_ucp_parm_Dst); UcpHandleInt(hf_ucp_parm_Rsn); UcpHandleTime(hf_ucp_parm_DSCTS); - ucp_handle_mt(tree, tvb, &offset); + UcpHandleByte(hf_ucp_parm_MT); + UcpHandleString(hf_ucp_parm_NB); + UcpHandleData(hf_ucp_data_section); UcpHandleByte(hf_ucp_parm_MMS); UcpHandleByte(hf_ucp_parm_PR); UcpHandleByte(hf_ucp_parm_DCs); |