aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2016-02-08 11:06:10 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2016-02-08 16:54:34 +0000
commit0f2a0e83fbb701a0836da36c16c162817d4a9b2f (patch)
tree87db569e8298ff1228ec7b7c04d11f3078d38a66
parent1b5382caa57555bd73601937d9f08afb179f0228 (diff)
Lua: Remove WSLUA_ERROR on dissecting error
On error in Dissector_call and DissectorTable_try we should not terminate with WSLUA_ERROR because the error is already reported in the tree with show_exception(). Change-Id: I60739f12cb8b16fe2270f47701286fd0dbf04c6f Reviewed-on: https://code.wireshark.org/review/13819 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r--epan/wslua/wslua_dissector.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/epan/wslua/wslua_dissector.c b/epan/wslua/wslua_dissector.c
index f68dfafd2b..abea124b08 100644
--- a/epan/wslua/wslua_dissector.c
+++ b/epan/wslua/wslua_dissector.c
@@ -101,7 +101,6 @@ WSLUA_METHOD Dissector_call(lua_State* L) {
Tvb tvb = checkTvb(L,WSLUA_ARG_Dissector_call_TVB);
Pinfo pinfo = checkPinfo(L,WSLUA_ARG_Dissector_call_PINFO);
TreeItem ti = checkTreeItem(L,WSLUA_ARG_Dissector_call_TREE);
- const char *volatile error = NULL;
int len = 0;
if (! ( d && tvb && pinfo) ) return 0;
@@ -111,11 +110,8 @@ WSLUA_METHOD Dissector_call(lua_State* L) {
/* XXX Are we sure about this??? is this the right/only thing to catch */
} CATCH_NONFATAL_ERRORS {
show_exception(tvb->ws_tvb, pinfo->ws_pinfo, ti->tree, EXCEPT_CODE, GET_MESSAGE);
- error = "Malformed frame";
} ENDTRY;
- if (error) { WSLUA_ERROR(Dissector_call,error); }
-
lua_pushnumber(L,(lua_Number)len);
WSLUA_RETURN(1); /* Number of bytes dissected. Note that some dissectors always return number of bytes in incoming buffer, so be aware. */
}
@@ -528,7 +524,6 @@ WSLUA_METHOD DissectorTable_try (lua_State *L) {
TreeItem ti = checkTreeItem(L,WSLUA_ARG_DissectorTable_try_TREE);
ftenum_t type;
gboolean handled = FALSE;
- const gchar *volatile error = NULL;
int len = 0;
if (! (dt && tvb && tvb->ws_tvb && pinfo && ti) ) return 0;
@@ -561,11 +556,8 @@ WSLUA_METHOD DissectorTable_try (lua_State *L) {
/* XXX Are we sure about this??? is this the right/only thing to catch */
} CATCH_NONFATAL_ERRORS {
show_exception(tvb->ws_tvb, pinfo->ws_pinfo, ti->tree, EXCEPT_CODE, GET_MESSAGE);
- error = "Malformed frame";
} ENDTRY;
- if (error) { WSLUA_ERROR(DissectorTable_try,error); }
-
lua_pushnumber(L,(lua_Number)len);
WSLUA_RETURN(1); /* Number of bytes dissected. Note that some dissectors always return number of bytes in incoming buffer, so be aware. */
}