From Toralf Foerster (in bug 1044):
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 23 Aug 2006 15:51:15 +0000 (15:51 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 23 Aug 2006 15:51:15 +0000 (15:51 +0000)
Add new primary sources, fix typo.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19007 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-ntp.c

index b7759f53350c53c0bd01049af33a8dcc4cf84797..f10811763020ad5b3331455a82689a0de40dcb44 100644 (file)
@@ -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) {