r11109 - prelude-correlator/trunk/plugins/lua
| Newsgroups | gmane.comp.security.ids.prelude.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: yoann Date: 2009-04-03 10:57:27 +0200 (Fri, 03 Apr 2009) New Revision: 11109 Modified: prelude-correlator/trunk/plugins/lua/lua-idmef.c Log: Implement patch by Jeffrey C. Ollie <[email protected]>, which make IDMEF:getraw() return a nil value (in place of nothing) if the retrieved element is empty. This fixes an Lua error that occur when calling IDMEF:set() using the result of IDMEF:getraw() on an empty element. Modified: prelude-correlator/trunk/plugins/lua/lua-idmef.c =================================================================== --- prelude-correlator/trunk/plugins/lua/lua-idmef.c 2009-02-11 21:56:24 UTC (rev 11108) +++ prelude-correlator/trunk/plugins/lua/lua-idmef.c 2009-04-03 08:57:27 UTC (rev 11109) @@ -320,8 +320,10 @@ return -1; } - if ( ret == 0 ) - return 0; + if ( ret == 0 ) { + lua_pushnil(lstate); + return 1; + } pushIDMEFValue(lstate, value); return 1; _______________________________________________ Prelude-cvslog site list [email protected] http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog