summaryrefslogtreecommitdiff
path: root/epan/wslua
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-01-23 19:40:51 -0800
committerGuy Harris <guy@alum.mit.edu>2016-01-24 03:41:28 +0000
commitbc5a0374bfd162d08834f5f7503bebd33d8ec943 (patch)
tree6d5be93a3e35c6eb144ce6d2b1d95650b5cbbd86 /epan/wslua
parentbaea677290f84d4e30e86194c79bafef0fdc1ad2 (diff)
downloadwireshark-bc5a0374bfd162d08834f5f7503bebd33d8ec943.tar.gz
Add the packet number to the packet_info structure, and use it.
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/wslua')
-rw-r--r--epan/wslua/wslua_listener.c2
-rw-r--r--epan/wslua/wslua_pinfo.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/epan/wslua/wslua_listener.c b/epan/wslua/wslua_listener.c
index 53b6a708ef..d65fde263c 100644
--- a/epan/wslua/wslua_listener.c
+++ b/epan/wslua/wslua_listener.c
@@ -45,7 +45,7 @@ static int tap_packet_cb_error_handler(lua_State* L) {
static int repeated = 0;
static int next = 2;
gchar* where = (lua_pinfo) ?
- wmem_strdup_printf(NULL, "Lua: on packet %i Error During execution of Listener Packet Callback",lua_pinfo->fd->num) :
+ wmem_strdup_printf(NULL, "Lua: on packet %i Error During execution of Listener Packet Callback",lua_pinfo->num) :
wmem_strdup_printf(NULL, "Lua: Error During execution of Listener Packet Callback") ;
/* show the error the 1st, 3rd, 5th, 9th, 17th, 33th... time it appears to avoid window flooding */
diff --git a/epan/wslua/wslua_pinfo.c b/epan/wslua/wslua_pinfo.c
index 3a9e94cf05..ac3e6c0b5a 100644
--- a/epan/wslua/wslua_pinfo.c
+++ b/epan/wslua/wslua_pinfo.c
@@ -218,7 +218,7 @@ lua_delta_nstime_to_sec(const Pinfo pinfo, const frame_data *fd, guint32 prev_nu
PINFO_NAMED_BOOLEAN_GETTER(visited,fd->flags.visited);
/* WSLUA_ATTRIBUTE Pinfo_number RO The number of this packet in the current file. */
-PINFO_NAMED_NUMBER_GETTER(number,fd->num);
+PINFO_NAMED_NUMBER_GETTER(number,num);
/* WSLUA_ATTRIBUTE Pinfo_len RO The length of the frame. */
PINFO_NAMED_NUMBER_GETTER(len,fd->pkt_len);
@@ -233,7 +233,7 @@ WSLUA_ATTRIBUTE_BLOCK_NUMBER_GETTER(Pinfo,abs_ts,lua_nstime_to_sec(&obj->ws_pinf
WSLUA_ATTRIBUTE_BLOCK_NUMBER_GETTER(Pinfo,rel_ts,lua_nstime_to_sec(&obj->ws_pinfo->rel_ts));
/* WSLUA_ATTRIBUTE Pinfo_delta_ts RO Number of seconds passed since the last captured packet. */
-WSLUA_ATTRIBUTE_BLOCK_NUMBER_GETTER(Pinfo,delta_ts,lua_delta_nstime_to_sec(obj, obj->ws_pinfo->fd, obj->ws_pinfo->fd->num - 1));
+WSLUA_ATTRIBUTE_BLOCK_NUMBER_GETTER(Pinfo,delta_ts,lua_delta_nstime_to_sec(obj, obj->ws_pinfo->fd, obj->ws_pinfo->num - 1));
/* WSLUA_ATTRIBUTE Pinfo_delta_dis_ts RO Number of seconds passed since the last displayed packet. */
WSLUA_ATTRIBUTE_BLOCK_NUMBER_GETTER(Pinfo,delta_dis_ts,lua_delta_nstime_to_sec(obj, obj->ws_pinfo->fd, obj->ws_pinfo->fd->prev_dis_num));