aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer_event.c
diff options
context:
space:
mode:
authorThomas Harning Jr <harningt@gmail.com>2011-01-15 19:51:21 -0500
committerThomas Harning Jr <harningt@gmail.com>2011-01-15 19:51:21 -0500
commit1153affe43bbc7f929213e0a5d6f8b5189cc45bd (patch)
tree1e63a88fdebccabf3529fa9c697c3f43b067c673 /src/buffer_event.c
parent24cac1c1bcf4b0dc3188f72934d2881692829e61 (diff)
parentd6cfe3ef1bc7d3c489abe394830211906e650d2c (diff)
downloadluaevent-prosody-1153affe43bbc7f929213e0a5d6f8b5189cc45bd.tar.gz
luaevent-prosody-1153affe43bbc7f929213e0a5d6f8b5189cc45bd.zip
Merge branch 'prosody-tree'
Diffstat (limited to 'src/buffer_event.c')
-rw-r--r--src/buffer_event.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/buffer_event.c b/src/buffer_event.c
index 7f1ab9b..0aab636 100644
--- a/src/buffer_event.c
+++ b/src/buffer_event.c
@@ -1,7 +1,6 @@
/* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
* Licensed as LGPL - See doc/COPYING for details */
#include "buffer_event.h"
-#include "luaevent.h"
#include "utility.h"
#include <lauxlib.h>
#include <malloc.h>
@@ -49,7 +48,12 @@ static void handle_callback(le_bufferevent* le_ev, short what, int callbackIndex
/* func, bufferevent */
lua_pushinteger(L, what);
/* What to do w/ errors...? */
- lua_pcall(L, 2, 0, 0);
+ if(!lua_pcall(L, 2, 0, 0))
+ {
+ /* FIXME: Perhaps luaevent users should be
+ * able to set an error handler? */
+ lua_pop(L, 1); /* Pop error message */
+ }
}
static void buffer_event_readcb(struct bufferevent *ev, void *ptr) {