Commit graph

19 commits

Author SHA1 Message Date
Felix Fietkau
3e45a782b2 libubus: remove ubus_msghdr_data() by passing in the right data structure pointer
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-09-15 15:33:27 +02:00
Alexandru Ardelean
6280cbaf09 libubus: fix msgbuf reduction logic during receive
Signed-off-by: Alexandru Ardelean <aa@ocedo.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-08-31 14:12:55 +02:00
Felix Fietkau
b79e808944 libubus: mark ubus socket with close-on-exec
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-08-31 14:10:26 +02:00
Alexandru Ardelean
5db90dbc94 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.
2014-07-03 12:45:30 +02:00
Alexandru Ardelean
82da9db3a9 libubus: add logic to reduce msgbuf data size after 16 small messages 2014-07-03 12:45:13 +02:00
Alexandru Ardelean
6d24ad71f6 ubus: increase message size limit and make it configurable at build-time 2014-07-03 12:44:19 +02:00
Alexandru Ardelean
7e746e5a85 libubus: refactor ubus_context msgbuf data to be dynamically allocated 2014-07-03 12:42:42 +02:00
Felix Fietkau
1d5ac421a5 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>
2014-03-18 22:36:38 +01:00
Felix Fietkau
8f3c5a7b50 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>
2014-02-27 16:48:55 +01:00
Felix Fietkau
47a9ab0c64 libubus: implement file descriptor passing support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-02-18 15:03:53 +01:00
Felix Fietkau
a9ee3ef0cf 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>
2013-10-29 17:28:37 +01:00
Felix Fietkau
b20a8a01c7 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>
2013-08-08 22:42:50 +02:00
Felix Fietkau
62bfc16a09 libubus: fix publishing objects after reconnect
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-08-08 22:20:39 +02:00
Yousong Zhou
2b4fc4c916 Add a return value to make compiler silent.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2013-08-04 10:53:36 +02:00
Yousong Zhou
cca7fb2ab1 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>
2013-08-04 10:53:24 +02:00
Felix Fietkau
90037b772c libubus: fix crash on reconnect with objects that have no type
Signed-off-by: John Crispin <blogic@openwrt.org>
2013-04-04 22:03:24 +02:00
Felix Fietkau
f3fabd45a7 libubus: implement notify handling
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-15 00:37:09 +01:00
Felix Fietkau
154a87c683 libubus: add UBUS_ATTR_NO_REPLY and add policy for UBUS_ATTR_ACTIVE
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-14 20:05:06 +01:00
Felix Fietkau
a6f52f058e libubus: split out some code into separate source files 2012-10-24 15:07:35 +02:00