diff options
-rw-r--r-- | epan/dissectors/packet-ntp.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-ntp.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-rtcp.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ntp.c b/epan/dissectors/packet-ntp.c index 2bfacdb42f..a88e6be3db 100644 --- a/epan/dissectors/packet-ntp.c +++ b/epan/dissectors/packet-ntp.c @@ -573,7 +573,7 @@ static tvbparse_wanted_t* want_ignore; * dissection of the next packet occurs. */ const char * -ntp_fmt_ts(const guint8 *reftime) +tvb_ntp_fmt_ts(tvbuff_t *tvb, gint offset) { guint32 tempstmp, tempfrac; time_t temptime; @@ -581,8 +581,8 @@ ntp_fmt_ts(const guint8 *reftime) double fractime; char *buff; - tempstmp = pntohl(&reftime[0]); - tempfrac = pntohl(&reftime[4]); + tempstmp = tvb_get_ntohl(tvb, offset); + tempfrac = tvb_get_ntohl(tvb, offset+4); if ((tempstmp == 0) && (tempfrac == 0)) { return "NULL"; } diff --git a/epan/dissectors/packet-ntp.h b/epan/dissectors/packet-ntp.h index 6f5bd435d2..8906cca963 100644 --- a/epan/dissectors/packet-ntp.h +++ b/epan/dissectors/packet-ntp.h @@ -32,6 +32,6 @@ #define NTP_BASETIME 2208988800ul #define NTP_TS_SIZE 100 -extern const char * ntp_fmt_ts(const guint8 *reftime); +extern const char *tvb_ntp_fmt_ts(tvbuff_t *tvb, gint offset); #endif diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index 965ed23c94..019178c9b3 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -1069,7 +1069,7 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_request_ts, tvb, offset, 8, ENC_TIME_NTP|ENC_BIG_ENDIAN); - buff = ntp_fmt_ts(tvb_get_ptr(tvb, offset, 8)); + buff = tvb_ntp_fmt_ts(tvb, offset); offset += 8; packet_len -=8; |