aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ntp.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2006-08-23 15:51:15 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2006-08-23 15:51:15 +0000
commitcfa1bda00b7e1a96e93a3c32bd2a2dc925ff5992 (patch)
tree4199de9a3a257753eb3578b0f36e5dfcb0906167 /epan/dissectors/packet-ntp.c
parent8fe329094f3d6ef14266cfaf1b46ceeb560ce1a6 (diff)
From Toralf Foerster (in bug 1044):
Add new primary sources, fix typo. svn path=/trunk/; revision=19007
Diffstat (limited to 'epan/dissectors/packet-ntp.c')
-rw-r--r--epan/dissectors/packet-ntp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ntp.c b/epan/dissectors/packet-ntp.c
index b7759f5335..f108117630 100644
--- a/epan/dissectors/packet-ntp.c
+++ b/epan/dissectors/packet-ntp.c
@@ -180,6 +180,8 @@ static const struct {
{ "IRIG", "IRIG-B timecode" },
{ "1PPS", "External 1 PPS input" },
{ "FREE", "(Internal clock)" },
+ { "INIT", "(Initialization)" },
+ { "\0\0\0\0", "NULL" },
{ NULL, NULL}
};
@@ -548,9 +550,9 @@ dissect_ntp_std(tvbuff_t *tvb, proto_tree *ntp_tree, guint8 flags)
* higher level server. My decision was to resolve this address.
*/
refid = tvb_get_ptr(tvb, 12, 4);
+ buff = ep_alloc(NTP_TS_SIZE);
if (stratum <= 1) {
- buff=ep_alloc(NTP_TS_SIZE);
- g_snprintf (buff, NTP_TS_SIZE, "Unindentified reference source '%.4s'",
+ g_snprintf (buff, NTP_TS_SIZE, "Unidentified reference source '%.4s'",
refid);
for (i = 0; primary_sources[i].id; i++) {
if (memcmp (refid, primary_sources[i].id, 4) == 0) {
@@ -561,7 +563,6 @@ dissect_ntp_std(tvbuff_t *tvb, proto_tree *ntp_tree, guint8 flags)
}
} else {
int buffpos;
- buff = ep_alloc(NTP_TS_SIZE);
refid_addr = tvb_get_ipv4(tvb, 12);
buffpos = g_snprintf(buff, NTP_TS_SIZE, "%s", get_hostname (refid_addr));
if (buffpos >= NTP_TS_SIZE) {