aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ntp.c
diff options
context:
space:
mode:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2006-08-23 15:51:15 +0000
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2006-08-23 15:51:15 +0000
commitb903f574b6f218b530edfb4cc9cb18ca256af98e (patch)
tree4199de9a3a257753eb3578b0f36e5dfcb0906167 /epan/dissectors/packet-ntp.c
parentbe1f67bc7b0d2fbcb2f4f01a2f8365dd0fd57bfa (diff)
From Toralf Foerster (in bug 1044):
Add new primary sources, fix typo. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19007 f5534014-38df-0310-8fa8-9805f1628bb7
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) {