From 424463e083b505eee67830f70183c457c313ed7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Tue, 18 Oct 2011 10:17:19 +0000 Subject: [PATCH] Use PINFO_GET_BOOLEAN for visited. svn path=/trunk/; revision=39458 --- epan/wslua/wslua_pinfo.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/epan/wslua/wslua_pinfo.c b/epan/wslua/wslua_pinfo.c index f77fd94563..b6e87cb404 100644 --- a/epan/wslua/wslua_pinfo.c +++ b/epan/wslua/wslua_pinfo.c @@ -886,6 +886,7 @@ static int Pinfo_tostring(lua_State *L) { lua_pushstring(L,"a Pinfo"); return 1; PINFO_GET_BOOLEAN(Pinfo_fragmented,pinfo->ws_pinfo->fragmented) PINFO_GET_BOOLEAN(Pinfo_in_error_pkt,pinfo->ws_pinfo->in_error_pkt) +PINFO_GET_BOOLEAN(Pinfo_visited,pinfo->ws_pinfo->fd->flags.visited) PINFO_GET_NUMBER(Pinfo_number,pinfo->ws_pinfo->fd->num) PINFO_GET_NUMBER(Pinfo_len,pinfo->ws_pinfo->fd->pkt_len) @@ -916,18 +917,6 @@ PINFO_GET_ADDRESS(Pinfo_dst,dst) PINFO_GET_LIGHTUSERDATA(Pinfo_private_data, pinfo->ws_pinfo->private_data) -static int Pinfo_visited(lua_State *L) { - Pinfo pinfo = checkPinfo(L,1); - if (!pinfo) return 0; - if (pinfo->expired) { - luaL_error(L,"expired_pinfo"); - return 0; - } - lua_pushboolean(L,pinfo->ws_pinfo->fd->flags.visited); - return 1; -} - - static int Pinfo_match(lua_State *L) { Pinfo pinfo = checkPinfo(L,1);