+/*
+ * 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"
ubus_msg_send(obj->client, *ub, false);
}
-bool strmatch_len(const char *s1, const char *s2, int *len)
+static bool strmatch_len(const char *s1, const char *s2, int *len)
{
for (*len = 0; s1[*len] == s2[*len]; (*len)++)
if (!s1[*len])
{
ubus_init_string_tree(&patterns, true);
event_obj = ubusd_create_object_internal(NULL, UBUS_SYSTEM_OBJECT_EVENT);
- event_obj->recv_msg = ubusd_event_recv;
+ if (event_obj != NULL)
+ event_obj->recv_msg = ubusd_event_recv;
}