Separate reassembly request methods in Lua API implementation.
authorrbalint <rbalint@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 15 Dec 2008 15:46:53 +0000 (15:46 +0000)
committerrbalint <rbalint@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 15 Dec 2008 15:46:53 +0000 (15:46 +0000)
Now both new-style and pinfo based method work without interference.

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

epan/wslua/init_wslua.c

index 2e8021c28124b9602283606b6b313a55a68c58d6..96a7e170cb22469c1e5374c9815c5fdfab29a9f5 100644 (file)
@@ -91,14 +91,8 @@ int dissect_lua(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) {
 
             /* if the Lua dissector reported the consumed bytes, pass it to our caller */
             if (lua_isnumber(L, -1)) { 
-                /* we got the consumed bytes of the missing bytes as a negative number */
-                if ((consumed_bytes = (int) lua_tonumber(L, -1)) < 0)
-                    pinfo->desegment_len = 0 - consumed_bytes;
-                /* Lua dissectors may return DESEGMENT_ONE_MORE_SEGMENT indicating that 
-                 * it needs need more bytes, but the exact number of needed bytes is not known  */
-                if (consumed_bytes == DESEGMENT_ONE_MORE_SEGMENT)
-                    pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT;
-
+                /* we got the consumed bytes or the missing bytes as a negative number */
+                consumed_bytes = (int) lua_tonumber(L, -1);
                 lua_pop(L, 1);
             }
         }