ubusd: handle invoke on event object without data
[project/ubus.git] / libubus.c
index 7ce454eabc648bcafccf3e6f5248c31228897b68..fc0d933894dd7ee9fb11a32414eba95952597f96 100644 (file)
--- a/libubus.c
+++ b/libubus.c
@@ -34,6 +34,9 @@ const char *__ubus_strerror[__UBUS_STATUS_LAST] = {
        [UBUS_STATUS_NOT_SUPPORTED] = "Operation not supported",
        [UBUS_STATUS_UNKNOWN_ERROR] = "Unknown error",
        [UBUS_STATUS_CONNECTION_FAILED] = "Connection failed",
+       [UBUS_STATUS_NO_MEMORY] = "Out of memory",
+       [UBUS_STATUS_PARSE_ERROR] = "Parsing message data failed",
+       [UBUS_STATUS_SYSTEM_ERROR] = "System error",
 };
 
 struct blob_buf b __hidden = {};
@@ -103,7 +106,9 @@ ubus_process_msg(struct ubus_context *ctx, struct ubus_msghdr_buf *buf, int fd)
                        break;
                }
 
+               ctx->stack_depth++;
                ubus_process_obj_msg(ctx, buf, fd);
+               ctx->stack_depth--;
                break;
        case UBUS_MSG_MONITOR:
                if (ctx->monitor_cb)