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
This commit is contained in:
parent
086896c241
commit
a7592d7e5b
4
AUTHORS
4
AUTHORS
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
12
packet-ucp.c
12
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);
|
||||
|
|
Loading…
Reference in New Issue