Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | workaround possibly false positive uses of memory after it is freed | Petr Štetiar | 2019-12-19 | 1 | -3/+5 |
| | | | | | | | | | | | | | | | | | | scan-build from clang-9 has reported following: libubox/list.h:83:22: warning: Use of memory after it is freed entry->next->prev = entry->prev; ^~~~~~~~~~~ ubusd_event.c:42:3: warning: Use of memory after it is freed ubusd_delete_event_source(ev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Which might be a false positives, but in order to make the code pass the static analyzer checks, rewrite the while loops on lists with the safe list iterator. Signed-off-by: Petr Štetiar <ynezz@true.cz> | ||||
* | libubus: fix incompatible pointer types assigment | Petr Štetiar | 2019-12-16 | 1 | -1/+1 |
| | | | | | | | | | | | | Fixes following error reported by clang-9 analyzer: libubus.c:286:19: error: incompatible pointer types assigning to 'struct blob_attr *' from 'char *' [-Werror,-Wincompatible-pointer-types] ctx->msgbuf.data = (char *) calloc(UBUS_MSG_CHUNK_SIZE, sizeof(char)); Result of 'calloc' is converted to a pointer of type 'struct blob_attr', which is incompatible with sizeof operand type 'char'. Signed-off-by: Petr Štetiar <ynezz@true.cz> | ||||
* | ubus: Remove unnecessary memset calls. | Rosen Penev | 2017-11-13 | 1 | -4/+2 |
| | | | | | | | Replace malloc+memset with calloc. Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name> | ||||
* | libubus: move uloop_init() call to ubus_connect_ctx | Felix Fietkau | 2017-01-22 | 1 | -0/+1 |
| | | | | | | uloop should not be used before it is initialized Signed-off-by: Felix Fietkau <nbd@nbd.name> | ||||
* | ubus: ubus_free: clear pending timers before freeing context | Abhimanyu Vishwakarma | 2017-01-04 | 1 | -0/+1 |
| | | | | | | | | | | | | If a synchronous operation is executed on a ubus context after uloop_done() has been called, the context's pending_timer may remain in uloop's list of timeouts. This leads to undefined behaviour during next execution of uloop code, as it may be referring to unavailable memory or memory that has been allocated for different purposes. Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com> Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com> | ||||
* | Allow sending a fd along a ubus_request | amine ahd | 2016-12-24 | 1 | -1/+1 |
| | | | | Signed-off-by: amine.ahd <amine.ahd@gmail.com> | ||||
* | libubus: nullify stale msgbuf pointer in case of ubus_connect_ctx() failure | Eyal Birger | 2016-05-15 | 1 | -0/+1 |
| | | | | | | | | | | | If the ubus_reconnect() call fails in ubus_connect_ctx(), the msgbuf.data newly allocated buffer is freed, but its pointer in the ubus_context is not removed. This leads to a double free error if ubus_auto_shutdown() is called for cleanup after ubus_auto_connect() failed to connect to ubusd. Signed-off-by: Eyal Birger <eyal.birger@gmail.com> | ||||
* | libubus: add null for ubus_context object in ubus_shutdown() | Alexandru Ardelean | 2015-12-19 | 1 | -0/+2 |
| | | | | | | | | At the moment, we do our own null checks before calling ubus_free(). The likely-hood of 'ctx' being null (in ubus_free()) is low, but since free() handles null, might make sense for ubus_free() to do so as well. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com> | ||||
* | libubus: add monitor support | Felix Fietkau | 2015-11-19 | 1 | -0/+4 |
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | libubus: Fix reverse order processing of pending ubus notifications messages | Hans Dedecker | 2015-11-02 | 1 | -1/+1 |
| | | | | | | | | Append ubus notification messages to the tail of the pending list so they're processed in the order as they're put onto the pending list Signed-off-by: Xinxing Hu <xinxing.huchn@gmail.com> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> | ||||
* | libubus: expose ubus_connect_ctx() in public API | Delio Brignoli | 2014-10-14 | 1 | -4/+11 |
| | | | | | | | | | ubus_connect_ctx() is equivalent to ubus_connect() but accepts a pointer to a previously allocated ubus_context struct. ubus_shutdown() is made available as an alternative to ubus_free() to clean up contexts initialised by ubus_connect_ctx(). Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com> | ||||
* | libubus: remove ubus_msghdr_data() by passing in the right data structure ↵ | Felix Fietkau | 2014-09-15 | 1 | -12/+10 |
| | | | | | | pointer Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | libubus: use calloc_a for queued msgs to reduce the number of allocations | Felix Fietkau | 2014-09-15 | 1 | -8/+5 |
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | libubus: fix a small memleak in ubus_register_event_handler() | Felix Fietkau | 2014-09-04 | 1 | -1/+4 |
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | ubus: increase message size limit and make it configurable at build-time | Alexandru Ardelean | 2014-07-03 | 1 | -1/+2 |
| | |||||
* | libubus: refactor ubus_context msgbuf data to be dynamically allocated | Alexandru Ardelean | 2014-07-03 | 1 | -5/+17 |
| | |||||
* | libubus: fix deferring invoke processing for non-uloop usage | Felix Fietkau | 2014-06-25 | 1 | -1/+2 |
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | libubus: always defer processing incoming invoke/unsubscribe/notify if there ↵ | Felix Fietkau | 2014-06-24 | 1 | -5/+6 |
| | | | | | | | | | 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> | ||||
* | libubus: implement file descriptor passing support | Felix Fietkau | 2014-02-18 | 1 | -4/+4 |
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | add auto (re)connect logic to libubus | John Crispin | 2014-01-22 | 1 | -8/+55 |
| | | | | Signed-off-by: John Crispin <blogic@openwrt.org> | ||||
* | libubus: pull the variable length data array out of struct ubus_msghdr to ↵ | Felix Fietkau | 2013-10-29 | 1 | -2/+2 |
| | | | | | | fix builds with clang Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | libubus: free internal blob_buf memory when freeing an ubus context | Felix Fietkau | 2012-12-30 | 1 | -0/+1 |
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | libubus: implement notify handling | Felix Fietkau | 2012-12-15 | 1 | -2/+3 |
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | move ubus_start_request to libubus-req.c | Felix Fietkau | 2012-12-14 | 1 | -16/+0 |
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | libubus: refactor code, move request handling to libubus-req.c | Felix Fietkau | 2012-12-14 | 1 | -277/+17 |
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | libubus: reduce code duplication and add stack depth protection for ↵ | Felix Fietkau | 2012-12-14 | 1 | -9/+3 |
| | | | | | | unsubscribe/notify callbacks Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | ubus: add notification for subscribers present/gone | Felix Fietkau | 2012-12-14 | 1 | -0/+4 |
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||||
* | watch add/remove -> subscribe/unsubscribe: | Felix Fietkau | 2012-12-13 | 1 | -75/+4 |
| | | | | | | | 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> | ||||
* | libubus: split out some code into separate source files | Felix Fietkau | 2012-10-24 | 1 | -415/+21 |
| | |||||
* | add support for deferring a reply to a method invoke call | Felix Fietkau | 2012-10-01 | 1 | -8/+13 |
| | |||||
* | libubus: add support for reconnecting (and re-publishing objects) | Felix Fietkau | 2012-05-29 | 1 | -30/+64 |
| | |||||
* | ubusd: add support for watching objects to get notified when they go away | Felix Fietkau | 2012-05-19 | 1 | -10/+77 |
| | |||||
* | libubus: limit stack depth for incoming invoke requests | Felix Fietkau | 2011-10-27 | 1 | -1/+40 |
| | |||||
* | libubus: fix recursive synchrnonous invoke commands | Felix Fietkau | 2011-10-27 | 1 | -5/+8 |
| | |||||
* | fix invalid message reuse in ubus_process_invoke | Felix Fietkau | 2011-10-10 | 1 | -3/+3 |
| | |||||
* | make the socket non-blocking, explicitly wait for data using poll() | Felix Fietkau | 2011-09-09 | 1 | -3/+15 |
| | |||||
* | add an error message for "unknown error" | Felix Fietkau | 2011-09-05 | 1 | -0/+1 |
| | |||||
* | add an error code for "operation not supported" | Felix Fietkau | 2011-09-05 | 1 | -0/+1 |
| | |||||
* | add copyright/license information | Felix Fietkau | 2011-06-17 | 1 | -0/+13 |
| | |||||
* | simplify object signatures by reusing the parser policy to define them | Felix Fietkau | 2011-03-27 | 1 | -46/+16 |
| | |||||
* | add support for timeouts on synchronous requests | Felix Fietkau | 2011-02-11 | 1 | -40/+70 |
| | |||||
* | remove separate catch all list, always require a pattern argument for ↵ | Felix Fietkau | 2011-02-11 | 1 | -3/+1 |
| | | | | registering events, even if it is just * | ||||
* | add writev_retry to avoid incomplete writes | Felix Fietkau | 2011-02-11 | 1 | -1/+34 |
| | |||||
* | add sender side length checks | Felix Fietkau | 2011-02-07 | 1 | -7/+26 |
| | |||||
* | remove unnecessary debug stuff | Felix Fietkau | 2011-02-07 | 1 | -11/+0 |
| | |||||
* | fix max message length handling - exclude the header | Felix Fietkau | 2011-02-07 | 1 | -1/+1 |
| | |||||
* | add code for sending events and fix the code for receiving events | Felix Fietkau | 2011-02-07 | 1 | -1/+18 |
| | |||||
* | make ubus_default_connection_lost static | Felix Fietkau | 2011-02-07 | 1 | -1/+1 |
| | |||||
* | add ubus_remove_object to libubus | Felix Fietkau | 2011-02-06 | 1 | -0/+37 |
| | |||||
* | follow blob_get_int* -> blob_get_u* rename | Felix Fietkau | 2011-02-06 | 1 | -7/+7 |
| |