oweals/ubus.git
10 years agolibubus: use explicit type name in ubus_msghdr_data instead of typeof()
Felix Fietkau [Thu, 3 Jul 2014 18:58:37 +0000 (20:58 +0200)]
libubus: use explicit type name in ubus_msghdr_data instead of typeof()

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agolibubus: move ubus_msghdr_data to libubus-internal.h
Felix Fietkau [Thu, 3 Jul 2014 18:58:01 +0000 (20:58 +0200)]
libubus: move ubus_msghdr_data to libubus-internal.h

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoubus: add count test to validate large message sizes
Alexandru Ardelean [Fri, 27 Jun 2014 16:11:45 +0000 (19:11 +0300)]
ubus: add count test to validate large message sizes

Client creates a string "1 2 3 ... 10000 ...", sends it to the server
along with the maximum number in the string.

Server creates another string like the client sent.

It validates it and, returns strcmp()'s result.

This is loop-ed every 2 seconds.

10 years agolibubus: fix ubus_invoke() to return err in case ubus_start_request() fails
Alexandru Ardelean [Fri, 27 Jun 2014 16:11:44 +0000 (19:11 +0300)]
libubus: fix ubus_invoke() to return err in case ubus_start_request() fails

Seems the UBUS_MAX_MSGLEN is ignored by ubus_invoke(),
and then segfault happens.

This issue is present before this set of patches.

10 years agoubusd: replace ubusd_msg_unshare() with ubus_msg_new() to prevent invalid free-ing
Alexandru Ardelean [Fri, 27 Jun 2014 16:11:43 +0000 (19:11 +0300)]
ubusd: replace ubusd_msg_unshare() with ubus_msg_new() to prevent invalid free-ing

The realloc is problematic mostly with large packets, as the pointer changes
so what eventually gets free'd is invalid.
Note that ub ptr param in the  call will be passed on to a ubus_msg_free(),
right after ubus_msg_ref() finishes.

This bug stayed hidden the same way as the bug in libubus writev_retry().
Since the write/sendmsg function can send about ~200k the ubus_msg_enqueue()
call does not get triggered.

10 years agolibubus: fix writev_retry() function when writing large packets
Alexandru Ardelean [Fri, 27 Jun 2014 16:11:42 +0000 (19:11 +0300)]
libubus: fix writev_retry() function when writing large packets

Seems this bug stayed hidden for a while, because the write/sendmsg function
can send up to ~200k in one send, so it looked at first why there was
some data mismatch.

10 years agolibubus: add logic to reduce msgbuf data size after 16 small messages
Alexandru Ardelean [Fri, 27 Jun 2014 16:11:41 +0000 (19:11 +0300)]
libubus: add logic to reduce msgbuf data size after 16 small messages

10 years agoubus: increase message size limit and make it configurable at build-time
Alexandru Ardelean [Fri, 27 Jun 2014 16:11:40 +0000 (19:11 +0300)]
ubus: increase message size limit and make it configurable at build-time

10 years agolibubus: refactor ubus_context msgbuf data to be dynamically allocated
Alexandru Ardelean [Fri, 27 Jun 2014 16:11:39 +0000 (19:11 +0300)]
libubus: refactor ubus_context msgbuf data to be dynamically allocated

10 years agolibubus: fix deferring invoke processing for non-uloop usage
Felix Fietkau [Tue, 24 Jun 2014 20:42:14 +0000 (22:42 +0200)]
libubus: fix deferring invoke processing for non-uloop usage

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agolibubus: always defer processing incoming invoke/unsubscribe/notify if there is a...
Felix Fietkau [Tue, 24 Jun 2014 20:34:50 +0000 (22:34 +0200)]
libubus: always defer processing incoming invoke/unsubscribe/notify if there is a request pending

This fixes recursion problems on config reload in netifd and simplifies
application handling of requests

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agocli: implement wait_for
Felix Fietkau [Tue, 6 May 2014 14:55:34 +0000 (16:55 +0200)]
cli: implement wait_for

Allows waiting for one or more objects to appear
Returns instantly if objects are already present

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agolua: forward return codes from lua to ubus
Steven Barth [Mon, 5 May 2014 17:47:32 +0000 (19:47 +0200)]
lua: forward return codes from lua to ubus

Signed-off-by: Steven Barth <cyrus@openwrt.org>
Tested-by: Luka Perkov <luka@openwrt.org>
10 years agolibubus: add support for defining a policy mask
Felix Fietkau [Sat, 26 Apr 2014 22:40:23 +0000 (00:40 +0200)]
libubus: add support for defining a policy mask

This allows sharing a policy array across methods, but masking out
unused entries for individual methods.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoubusd: fix processing object method signatures
Felix Fietkau [Tue, 1 Apr 2014 11:45:29 +0000 (13:45 +0200)]
ubusd: fix processing object method signatures

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agolibubus: do not use uloop_run() inside ubus_complete_request
Felix Fietkau [Tue, 18 Mar 2014 21:36:36 +0000 (22:36 +0100)]
libubus: do not use uloop_run() inside ubus_complete_request

Avoid unrelated uloop callbacks by using poll() on the ubus fd instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agolibubus-internal: use the __hidden definition from libubox
Felix Fietkau [Tue, 18 Mar 2014 21:12:21 +0000 (22:12 +0100)]
libubus-internal: use the __hidden definition from libubox

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agolibubus: close file descriptor after passing it in the status msg
Felix Fietkau [Thu, 27 Feb 2014 15:48:53 +0000 (16:48 +0100)]
libubus: close file descriptor after passing it in the status msg

Simplifies handling of non-deferred requests

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoubus: Fix imbalance in lua stack push/pop of values.
Karl Vogel [Tue, 11 Feb 2014 08:27:36 +0000 (09:27 +0100)]
ubus: Fix imbalance in lua stack push/pop of values.

The lua getglobal and rawgeti both push a value onto the lua stack,
but they weren't being removed by the ubus_method_handler function,
thus corrupting the lua stack.

In case the specified method wasn't a function, the stack was also
corrupted as the method name remained on the stack.

Signed-off-by: Karl Vogel <karl.vogel@gmail.com>
10 years agoexamples/client: receive data from the passed file descriptor
Felix Fietkau [Tue, 18 Feb 2014 14:03:44 +0000 (15:03 +0100)]
examples/client: receive data from the passed file descriptor

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoexamples/server: send a file descriptor as part of the request to the "hello" method
Felix Fietkau [Tue, 18 Feb 2014 14:03:22 +0000 (15:03 +0100)]
examples/server: send a file descriptor as part of the request to the "hello" method

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agolibubus: implement file descriptor passing support
Felix Fietkau [Tue, 18 Feb 2014 14:02:48 +0000 (15:02 +0100)]
libubus: implement file descriptor passing support

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoubusd: implement protocol support for passing file descriptors as part of request...
Felix Fietkau [Tue, 18 Feb 2014 14:01:39 +0000 (15:01 +0100)]
ubusd: implement protocol support for passing file descriptors as part of request completion msgs from objects to clients

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agolua: allow methods with no arguments
Luka Perkov [Sun, 26 Jan 2014 17:33:36 +0000 (17:33 +0000)]
lua: allow methods with no arguments

In C it is possible to have methods without arguments (UBUS_METHOD_NOARG).
Enable support for the same calls in Lua too.

This commit also fixes segfault which can be caused by passing non-table type
where table is expected. The lua_gettablelen() function is called after we have
made sure we are dealing with a table in the first place.

Signed-off-by: Luka Perkov <luka@openwrt.org>
10 years agolua: fix whitespaces and typo
Luka Perkov [Sun, 26 Jan 2014 17:32:10 +0000 (17:32 +0000)]
lua: fix whitespaces and typo

Signed-off-by: Luka Perkov <luka@openwrt.org>
10 years agoadd auto (re)connect logic to libubus
John Crispin [Wed, 22 Jan 2014 13:53:11 +0000 (13:53 +0000)]
add auto (re)connect logic to libubus

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agoadd Lua bindings for ubus events
John Crispin [Thu, 7 Nov 2013 12:51:11 +0000 (13:51 +0100)]
add Lua bindings for ubus events

It mostly mimick the style of the existing code.

With it and the ubox Lua bindings, you can now send ubus events
through Lua or listen for events (you can register for multiple events
at the same time).

Signed-off-by: Jeff Remy <jeff.remy@gmail.com>
11 years agolibubus: pull the variable length data array out of struct ubus_msghdr to fix builds...
Felix Fietkau [Tue, 29 Oct 2013 16:28:33 +0000 (17:28 +0100)]
libubus: pull the variable length data array out of struct ubus_msghdr to fix builds with clang

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agoubusd: use umask of 0177 for now to prevent a world- and group-writable unix socket
Jo-Philipp Wich [Sat, 28 Sep 2013 17:23:01 +0000 (17:23 +0000)]
ubusd: use umask of 0177 for now to prevent a world- and group-writable unix socket

11 years agolibubus: Check if remove callback exists before call it
Lukasz Baj [Thu, 29 Aug 2013 09:05:51 +0000 (11:05 +0200)]
libubus: Check if remove callback exists before call it

When process unsubscribes then remove callback is called. But it
can be NULL if not defined, so we should check it before we call it.

Signed-off-by: Lukasz Baj <l.baj@radytek.com>
11 years agolibubus: detect read/write errors and set the eof flag, even if uloop is not used...
Felix Fietkau [Thu, 8 Aug 2013 20:42:50 +0000 (22:42 +0200)]
libubus: detect read/write errors and set the eof flag, even if uloop is not used as main event loop

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: fix publishing objects after reconnect
Felix Fietkau [Thu, 8 Aug 2013 20:14:27 +0000 (22:14 +0200)]
libubus: fix publishing objects after reconnect

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agoAdd a return value to make compiler silent.
Yousong Zhou [Thu, 25 Jul 2013 12:38:09 +0000 (20:38 +0800)]
Add a return value to make compiler silent.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
11 years agoFix the condition for stopping the writev_retry.
Yousong Zhou [Thu, 25 Jul 2013 12:38:08 +0000 (20:38 +0800)]
Fix the condition for stopping the writev_retry.

All iov's were sent only after the last were sent (iov_len == 0). We
could have 'cur_len == 0' if the sent iov's were sent wholly but not all
iov's were sent (how about all but the last).

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
11 years agolibubus: fix logic inversion for cancelling requests
Felix Fietkau [Thu, 30 May 2013 10:39:51 +0000 (12:39 +0200)]
libubus: fix logic inversion for cancelling requests

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agocli: use the new json-c library name
Felix Fietkau [Wed, 29 May 2013 10:53:17 +0000 (12:53 +0200)]
cli: use the new json-c library name

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: fix deadlock in recursive synchronous ubus requests
Felix Fietkau [Sat, 11 May 2013 18:39:54 +0000 (20:39 +0200)]
libubus: fix deadlock in recursive synchronous ubus requests

When synchronous request completion loops are running, the innermost
loop can receive events that can unblock the outer loops, however the
loop clears uloop_cancelled (which is set by the request completion).

This causes the event loop to continue running even while a completion
loop has already been unblocked.

Fix this by not clearing uloop_cancelled for inner loops

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: fix crash on reconnect with objects that have no type
Felix Fietkau [Thu, 4 Apr 2013 20:03:03 +0000 (22:03 +0200)]
libubus: fix crash on reconnect with objects that have no type

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agolibubus: fix passing the return code of the subscriber callback to the notifier
Felix Fietkau [Sun, 17 Mar 2013 17:29:38 +0000 (18:29 +0100)]
libubus: fix passing the return code of the subscriber callback to the notifier

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: fix synchronous ubus_notify without waiting for a timeout
Felix Fietkau [Sun, 17 Mar 2013 16:55:11 +0000 (17:55 +0100)]
libubus: fix synchronous ubus_notify without waiting for a timeout

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: add ubus_unregister_subscriber wrapper
Felix Fietkau [Sun, 17 Mar 2013 02:11:35 +0000 (03:11 +0100)]
libubus: add ubus_unregister_subscriber wrapper

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: add UBUS_METHOD_NOARG
Felix Fietkau [Wed, 6 Mar 2013 15:56:33 +0000 (16:56 +0100)]
libubus: add UBUS_METHOD_NOARG

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agoadd systemd support
Thomas Gstädtner [Mon, 4 Mar 2013 18:05:09 +0000 (19:05 +0100)]
add systemd support

This adds basic systemd support, incl. socket activation.
If systemd build is disabled, there won't be any sign of it neither
during build nor after.
If systemd build is enabled (default), but systemd is not available,
no systemd stuff is installed, so there is no impact whatsoever.

11 years agomake UBUS_UNIX_SOCKET configurable via cmake
Thomas Gstädtner [Mon, 4 Mar 2013 18:05:08 +0000 (19:05 +0100)]
make UBUS_UNIX_SOCKET configurable via cmake

this is mainly useful to have a single location to read the setting
from, when it is used multiple times at build time (which it will in a
following patch) :)

11 years agoadd INCLUDE_DIRECTORIES to subdirectories
Thomas Gstädtner [Sun, 3 Mar 2013 02:06:20 +0000 (03:06 +0100)]
add INCLUDE_DIRECTORIES to subdirectories

11 years agomake building examples an option
Thomas Gstädtner [Sun, 3 Mar 2013 02:06:19 +0000 (03:06 +0100)]
make building examples an option

11 years agobuild: remove install prefix override
Felix Fietkau [Wed, 23 Jan 2013 14:22:46 +0000 (15:22 +0100)]
build: remove install prefix override

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolua: pass u64 blob type as double to Lua
Jo-Philipp Wich [Sun, 13 Jan 2013 19:37:00 +0000 (20:37 +0100)]
lua: pass u64 blob type as double to Lua

11 years agolibubus: free internal blob_buf memory when freeing an ubus context
Felix Fietkau [Sun, 30 Dec 2012 13:12:10 +0000 (14:12 +0100)]
libubus: free internal blob_buf memory when freeing an ubus context

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agoexamples: disable the message on the server example, measure the notify latency on...
Felix Fietkau [Sat, 15 Dec 2012 15:52:03 +0000 (16:52 +0100)]
examples: disable the message on the server example, measure the notify latency on the client example

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: fix data type of request sequence counter. fixes hang after ~64K requests
Felix Fietkau [Sat, 15 Dec 2012 15:51:28 +0000 (16:51 +0100)]
libubus: fix data type of request sequence counter. fixes hang after ~64K requests

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: fix uninitialized variable warning
Felix Fietkau [Sat, 15 Dec 2012 13:11:15 +0000 (14:11 +0100)]
libubus: fix uninitialized variable warning

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agoexamples: use blocking notify
Felix Fietkau [Fri, 14 Dec 2012 23:37:26 +0000 (00:37 +0100)]
examples: use blocking notify

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: implement notify handling
Felix Fietkau [Fri, 14 Dec 2012 23:37:09 +0000 (00:37 +0100)]
libubus: implement notify handling

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: fix segfaults on request timeouts
Felix Fietkau [Fri, 14 Dec 2012 23:35:12 +0000 (00:35 +0100)]
libubus: fix segfaults on request timeouts

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agoubusd: implement notify forwarding with status reporting
Felix Fietkau [Fri, 14 Dec 2012 23:32:27 +0000 (00:32 +0100)]
ubusd: implement notify forwarding with status reporting

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: check if subscriber cb is non-NULL before calling it
Felix Fietkau [Fri, 14 Dec 2012 20:27:52 +0000 (21:27 +0100)]
libubus: check if subscriber cb is non-NULL before calling it

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: do not send a status reply if UBUS_ATTR_NO_REPLY is set
Felix Fietkau [Fri, 14 Dec 2012 19:05:34 +0000 (20:05 +0100)]
libubus: do not send a status reply if UBUS_ATTR_NO_REPLY is set

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: add UBUS_ATTR_NO_REPLY and add policy for UBUS_ATTR_ACTIVE
Felix Fietkau [Fri, 14 Dec 2012 19:05:06 +0000 (20:05 +0100)]
libubus: add UBUS_ATTR_NO_REPLY and add policy for UBUS_ATTR_ACTIVE

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agomove ubus_start_request to libubus-req.c
Felix Fietkau [Fri, 14 Dec 2012 18:48:26 +0000 (19:48 +0100)]
move ubus_start_request to libubus-req.c

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: remove accidentally committed unused header file
Felix Fietkau [Fri, 14 Dec 2012 13:14:43 +0000 (14:14 +0100)]
libubus: remove accidentally committed unused header file

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: refactor code, move request handling to libubus-req.c
Felix Fietkau [Fri, 14 Dec 2012 13:13:27 +0000 (14:13 +0100)]
libubus: refactor code, move request handling to libubus-req.c

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agolibubus: reduce code duplication and add stack depth protection for unsubscribe/notif...
Felix Fietkau [Fri, 14 Dec 2012 12:42:10 +0000 (13:42 +0100)]
libubus: reduce code duplication and add stack depth protection for unsubscribe/notify callbacks

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agoremove the "method" argument for object subscription
Felix Fietkau [Fri, 14 Dec 2012 12:11:40 +0000 (13:11 +0100)]
remove the "method" argument for object subscription

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agoubus: add notification for subscribers present/gone
Felix Fietkau [Fri, 14 Dec 2012 12:00:49 +0000 (13:00 +0100)]
ubus: add notification for subscribers present/gone

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agowatch add/remove -> subscribe/unsubscribe:
Felix Fietkau [Thu, 13 Dec 2012 17:44:15 +0000 (18:44 +0100)]
watch add/remove -> subscribe/unsubscribe:

rename the ADD_WATCH/REMOVE_WATCH messages to SUBSCRIBE/UNSUBSCRIBE and change
the message format and libubus API in preparation for adding object notifications

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
11 years agoubusd: use avl_strcmp
Felix Fietkau [Tue, 11 Dec 2012 17:53:17 +0000 (18:53 +0100)]
ubusd: use avl_strcmp

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agolibubus: fix stack space init for processing requests
Felix Fietkau [Tue, 30 Oct 2012 12:41:17 +0000 (13:41 +0100)]
libubus: fix stack space init for processing requests

Fixes client timeouts on invoke on some platforms

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 years agolibubus: split out some code into separate source files
Felix Fietkau [Wed, 24 Oct 2012 12:37:44 +0000 (14:37 +0200)]
libubus: split out some code into separate source files

12 years agoexamples: split client/server code
Felix Fietkau [Mon, 1 Oct 2012 13:03:26 +0000 (15:03 +0200)]
examples: split client/server code

12 years agomove example to examples/
Felix Fietkau [Mon, 1 Oct 2012 12:54:54 +0000 (14:54 +0200)]
move example to examples/

12 years agolua: remove a superfluous lua_pop() when checking table style
Jo-Philipp Wich [Wed, 17 Oct 2012 13:32:26 +0000 (15:32 +0200)]
lua: remove a superfluous lua_pop() when checking table style

12 years agolua: fix ubus_lua_format_blob_is_array() to not leave garbage on the stack
Jo-Philipp Wich [Tue, 16 Oct 2012 16:37:31 +0000 (19:37 +0300)]
lua: fix ubus_lua_format_blob_is_array() to not leave garbage on the stack

12 years agoadd deferred reply to the ubus server example
Felix Fietkau [Mon, 1 Oct 2012 12:09:37 +0000 (14:09 +0200)]
add deferred reply to the ubus server example

12 years agoadd support for deferring a reply to a method invoke call
Felix Fietkau [Mon, 1 Oct 2012 12:09:19 +0000 (14:09 +0200)]
add support for deferring a reply to a method invoke call

12 years agolua: propagate incoming message to method callback inside the lua context
John Crispin [Fri, 28 Sep 2012 23:37:37 +0000 (01:37 +0200)]
lua: propagate incoming message to method callback inside the lua context

Signed-off-by: John Crispin <blogic@openwrt.org>
12 years agocli: add array and table types to method signature dump
Felix Fietkau [Fri, 28 Sep 2012 21:10:23 +0000 (23:10 +0200)]
cli: add array and table types to method signature dump

12 years agoadd lua binding test scripts
John Crispin [Wed, 26 Sep 2012 16:27:10 +0000 (18:27 +0200)]
add lua binding test scripts

Signed-off-by: John Crispin <blogic@openwrt.org>
12 years agolua: add support for registering methods
Felix Fietkau [Thu, 27 Sep 2012 12:00:49 +0000 (14:00 +0200)]
lua: add support for registering methods

Signed-off-by: John Crispin <blogic@openwrt.org>
12 years agolua: add uloop support
Felix Fietkau [Thu, 27 Sep 2012 11:59:47 +0000 (13:59 +0200)]
lua: add uloop support

12 years agolua: allow building the lua binding with vanilla lua
John Crispin [Wed, 26 Sep 2012 16:27:09 +0000 (18:27 +0200)]
lua: allow building the lua binding with vanilla lua

Signed-off-by: John Crispin <blogic@openwrt.org>
12 years agolibubus: fix multiple inclusions of libubus.h
Felix Fietkau [Fri, 1 Jun 2012 08:08:58 +0000 (10:08 +0200)]
libubus: fix multiple inclusions of libubus.h

12 years agolibubus: add support for reconnecting (and re-publishing objects)
Felix Fietkau [Mon, 28 May 2012 22:56:37 +0000 (00:56 +0200)]
libubus: add support for reconnecting (and re-publishing objects)

12 years agoenable -Wmissing-declarations
Felix Fietkau [Mon, 28 May 2012 22:41:39 +0000 (00:41 +0200)]
enable -Wmissing-declarations

12 years agolua: add a prototype for luaopen_ubus so that -Wmissing-declarations can be enabled
Felix Fietkau [Mon, 28 May 2012 22:41:27 +0000 (00:41 +0200)]
lua: add a prototype for luaopen_ubus so that -Wmissing-declarations can be enabled

12 years agomake a few functions static
Felix Fietkau [Mon, 28 May 2012 22:40:50 +0000 (00:40 +0200)]
make a few functions static

12 years agoubus-example: use object notification, add a simple client mode
Felix Fietkau [Sat, 19 May 2012 19:09:50 +0000 (21:09 +0200)]
ubus-example: use object notification, add a simple client mode

12 years agoubusd: add support for watching objects to get notified when they go away
Felix Fietkau [Sat, 19 May 2012 19:09:35 +0000 (21:09 +0200)]
ubusd: add support for watching objects to get notified when they go away

12 years agoubusd: allow registration of anonymous objects with type
Felix Fietkau [Sat, 19 May 2012 14:21:22 +0000 (16:21 +0200)]
ubusd: allow registration of anonymous objects with type

12 years agouloop: do not use ULOOP_EDGE_TRIGGER for the blocking socket, it can miss some events...
Felix Fietkau [Fri, 18 May 2012 20:32:25 +0000 (22:32 +0200)]
uloop: do not use ULOOP_EDGE_TRIGGER for the blocking socket, it can miss some events due to races

12 years agolua: put LUAPATH in quotes to prevent weird error messages when it is unset
Felix Fietkau [Sun, 6 May 2012 08:25:46 +0000 (10:25 +0200)]
lua: put LUAPATH in quotes to prevent weird error messages when it is unset

12 years agocli: prevent indenting if simple output is requested
Felix Fietkau [Wed, 14 Mar 2012 15:32:06 +0000 (16:32 +0100)]
cli: prevent indenting if simple output is requested

12 years agoimplement Lua binding
Jo-Philipp Wich [Sat, 5 May 2012 20:37:46 +0000 (22:37 +0200)]
implement Lua binding

13 years agofix unused but set variable
Felix Fietkau [Fri, 28 Oct 2011 20:21:52 +0000 (22:21 +0200)]
fix unused but set variable

13 years agolibubus: limit stack depth for incoming invoke requests
Felix Fietkau [Thu, 27 Oct 2011 12:03:19 +0000 (14:03 +0200)]
libubus: limit stack depth for incoming invoke requests

13 years agolibubus: fix recursive synchrnonous invoke commands
Felix Fietkau [Thu, 27 Oct 2011 11:46:05 +0000 (13:46 +0200)]
libubus: fix recursive synchrnonous invoke commands

13 years agofix invalid message reuse in ubus_process_invoke
Felix Fietkau [Mon, 10 Oct 2011 14:47:49 +0000 (16:47 +0200)]
fix invalid message reuse in ubus_process_invoke

13 years agoubusd: fix a use after free bug
Felix Fietkau [Wed, 14 Sep 2011 15:09:19 +0000 (17:09 +0200)]
ubusd: fix a use after free bug

13 years agomake the socket non-blocking, explicitly wait for data using poll()
Felix Fietkau [Fri, 9 Sep 2011 15:53:22 +0000 (17:53 +0200)]
make the socket non-blocking, explicitly wait for data using poll()

13 years agoadd -v
Felix Fietkau [Mon, 5 Sep 2011 02:00:20 +0000 (04:00 +0200)]
add -v