~ubuntu-branches/ubuntu/gutsy/wireshark/gutsy-security

« back to all changes in this revision

Viewing changes to epan/wslua/wslua_listener.c

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2007-04-01 08:58:40 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070401085840-or3qhrpv8alt1bwg
Tags: 0.99.5-1
* New upstream release.
* debian/patches/09_idl2wrs.dpatch: updated to patch idl2wrs.sh.in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 *
8
8
 * (c) 2006, Luis E. Garcia Ontanon <luis.ontanon@gmail.com>
9
9
 *
10
 
 * $Id: wslua_listener.c 19595 2006-10-18 18:45:24Z lego $
 
10
 * $Id: wslua_listener.c 20208 2006-12-23 03:53:13Z lego $
11
11
 *
12
12
 * Wireshark - Network traffic analyzer
13
13
 * By Gerald Combs <gerald@wireshark.org>
81
81
int lua_tap_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data) {
82
82
    Listener tap = tapdata;
83
83
    int retval = 0;
84
 
 
 
84
        
85
85
    if (tap->packet_ref == LUA_NOREF) return 0;
86
86
 
87
87
    lua_settop(tap->L,0);
106
106
    
107
107
    switch ( lua_pcall(tap->L,3,1,1) ) {
108
108
        case 0:
109
 
            
110
 
            if (lua_gettop(tap->L) == 1)
111
 
                retval = luaL_checkint(tap->L,1);
112
 
            else 
113
 
                retval = 1;
114
 
            
 
109
                        retval = luaL_optint(tap->L,-1,1);
115
110
            break;
116
111
        case LUA_ERRRUN:
117
112
            break;