+/*
+ * Copyright (C) 2011 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
#include <arpa/inet.h>
#include "ubusd.h"
{
struct ubus_object *obj;
char *objpath;
- bool wildcard = false;
bool found = false;
int len;
}
objpath[--len] = 0;
- wildcard = true;
obj = avl_find_ge_element(&path, objpath, obj, path);
if (!obj)
static int ubusd_handle_invoke(struct ubus_client *cl, struct ubus_msg_buf *ub, struct blob_attr **attr)
{
+ struct ubus_msg_buf *ub_new;
struct ubus_object *obj = NULL;
struct ubus_id *id;
const char *method;
blob_put(&b, UBUS_ATTR_DATA, blob_data(attr[UBUS_ATTR_DATA]),
blob_len(attr[UBUS_ATTR_DATA]));
+ ub_new = ubus_reply_from_blob(ub, true);
ubus_msg_free(ub);
+ ub = ub_new;
- ub = ubus_reply_from_blob(ub, true);
if (!ub)
return UBUS_STATUS_NO_DATA;