system-monitor: plant the necessary funcbridge gettop/settop wrappers.
authorKrisztian Litkey <kli@iki.fi>
Fri, 24 Oct 2014 16:36:48 +0000 (19:36 +0300)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:18 +0000 (18:37 +0200)
Change-Id: I201ec63c673cad1312834bdc7b04efd702f2b60d

src/plugins/system-monitor/process-watch.c

index b4dab19..ab10a35 100644 (file)
@@ -138,12 +138,15 @@ static void process_watch_notify(process_watch_lua_t *w, lua_State *L,
 {
     mrp_funcbridge_value_t args[3], rv;
     char                            rt;
+    int                             top;
 
     if (L == NULL || w->notify == NULL)
         return;
 
     mrp_debug("notifying process watch %p", w);
 
+    top = lua_gettop(L);
+
     args[0].pointer = w;
     args[1].pointer = event_create(L, e);
 
@@ -151,6 +154,8 @@ static void process_watch_notify(process_watch_lua_t *w, lua_State *L,
         mrp_log_error("Failed to notify process watch %p.", w);
         mrp_free((char *)rv.string);
     }
+
+    lua_settop(L, top);
 }