Commit graph

334 commits

Author SHA1 Message Date
Felix Fietkau
33b9f3aa0b uloop: fix sub-second timer offsets for uloop_timeout_set 2012-10-31 20:03:45 +01:00
Felix Fietkau
a9b44ebe55 ustream: make notify_state optional as well 2012-10-30 00:00:57 +01:00
Felix Fietkau
efc9f4b702 ustream: mark notify_read cb as optional 2012-10-30 00:00:23 +01:00
Felix Fietkau
dc69ce4799 ustream: add a poll callback function defined by the ustream implementation 2012-10-29 23:39:48 +01:00
Felix Fietkau
df0968d19b ustream: fix variable initialization
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-10-29 23:11:08 +01:00
Felix Fietkau
15ce776772 ustream-example: fix logic inversion 2012-10-23 18:00:20 +02:00
Felix Fietkau
6e7e8a1a91 uloop: fix a segfault on deleting the first active timer from within another timer 2012-10-23 03:41:45 +02:00
Felix Fietkau
0e51f714d1 ustream: add a pointer to the ustream struct useful for chaining ustreams 2012-10-22 22:28:47 +02:00
Felix Fietkau
ba6cd4c322 ustream.h: include stdarg.h 2012-10-22 21:14:02 +02:00
Felix Fietkau
9afe120530 add -Wmissing-declarations to cflags 2012-10-22 20:03:53 +02:00
Felix Fietkau
db38b74ac6 add declarations for lua{open,close}_uloop to avoid warnings 2012-10-22 20:03:36 +02:00
Felix Fietkau
42cd90bf4b ustream: make ustream_init_buf static 2012-10-22 20:02:38 +02:00
Felix Fietkau
e4027a6327 add a cmake file for the examples and add the binaries to .gitignore 2012-10-21 23:01:30 +02:00
Felix Fietkau
d3b3280055 ustream: add example code 2012-10-21 23:01:12 +02:00
Felix Fietkau
768a69b3ce add ustream, an api for stream buffer management 2012-10-21 23:00:06 +02:00
Felix Fietkau
ae3bcf84e1 blobmsg-example: fix compile errors 2012-10-21 03:40:53 +02:00
Felix Fietkau
e3efdcfe15 uloop: fix event delete races on mac os x 2012-10-21 03:40:35 +02:00
Felix Fietkau
d6d6f11625 list.h: undefine LIST_HEAD to prevent conflicts on mac os x 2012-10-04 16:11:04 +02:00
Felix Fietkau
5038992465 lua: use relative paths for includes instead of system-wide 2012-10-04 14:14:52 +02:00
John Crispin
6ba84c7623 rename proc_cb to ul_process_cb
Signed-off-by: John Crispin <blogic@openwrt.org>
2012-09-29 01:15:54 +02:00
Felix Fietkau
0a81131257 add an example script for the uloop lua binding 2012-09-27 13:47:46 +02:00
Felix Fietkau
a81cb397ef add lua binding for uloop (written by John Crispin) 2012-09-27 13:41:02 +02:00
Felix Fietkau
cca2ed6c8c uloop: clear processes and timeouts on uloop_done() 2012-07-08 22:27:40 +02:00
Jo-Philipp Wich
0001d8ab26 uloop: handle EPOLLHUP like EPOLLERR to prevent infinite tight loops between epoll_wait() and the continue in uloop_run_events() 2012-07-07 18:17:40 +02:00
Felix Fietkau
bbdc3bdb05 blobmsg: remove the unnecessary name argument from blobmsg_check_attr_list, infer it from the list type 2012-06-24 21:11:06 +02:00
Felix Fietkau
f1494cde4d blobmsg: add blobmsg_check_attr_list() to validate element types of arrays and tables 2012-06-24 21:07:47 +02:00
Felix Fietkau
63bc6593c3 uloop: prevent fd callbacks for unregistered fds by ensuring that pointers in the epoll array are cleared 2012-06-24 21:06:16 +02:00
Felix Fietkau
eedf91d212 vlist.h: protect against multiple inclusions 2012-06-10 17:11:36 +02:00
Felix Fietkau
5cfe2696f0 blob: add blob_memdup() 2012-06-01 20:54:20 +02:00
Jo-Philipp Wich
0608d12995 sh/jshn.sh: fix json_get_var() and json_get_type() to not return cached values 2012-05-30 21:47:43 +02:00
Jo-Philipp Wich
c0b8aaab1a Merge branch 'master' of nbd.name:luci2/libubox 2012-05-29 02:17:35 +02:00
Jo-Philipp Wich
66308641bf sh/jshn.sh: replace "tr" calls with inline substitution, signalize success with return values 2012-05-29 02:13:15 +02:00
Jo-Philipp Wich
67bc554465 sh/jshn.sh: replace "tr" calls with inline substitution, signalize success with return values 2012-05-29 02:12:35 +02:00
Benjamin Larsson
652162cf86 uloop: include sys/types.h to make pid_t available 2012-05-28 15:17:46 +02:00
Felix Fietkau
4956848aa9 remove uapi.h, afacis nothing uses it 2012-05-26 18:04:34 +02:00
Felix Fietkau
6a2e4f449d switch blobmsg_json over to permissive license 2012-05-26 18:03:08 +02:00
Felix Fietkau
74cdaf796f switch blobmsg over to permissive license 2012-05-26 18:02:30 +02:00
Felix Fietkau
6cfc0f1d2b remove ulog.h, afaics nothing uses it 2012-05-26 18:01:18 +02:00
Felix Fietkau
cddd9326dc add vlist (from netifd) 2012-05-26 18:01:18 +02:00
Felix Fietkau
08a4bf2a29 add avl_strcmp 2012-05-26 18:01:18 +02:00
Felix Fietkau
94ff2a0abb sh/jshn.sh: fix allowing numbers in identifiers
json_add_generic() needs to handle them as well
2012-05-17 14:30:00 +02:00
Jo-Philipp Wich
592f2dbd82 sh/jshn.sh: allow numbers in identifiers for json_get_var()
When traversing arrays of tables or arrays of array it is required to
call json_select # where # is the index of the array item to select.

Internally json_select() calls json_get_var() to obtain the correct
prefix to populate $JSON_CUR with. However, the "tr" call in
json_get_var() incorrectly replaces all digits with underscores,
making any lookup for numeric array items fail.

The attached patch changes the "tr" expression to allow digits and
thus implements the expected behaviour for nested arrays.
2012-05-16 10:42:37 +02:00
Felix Fietkau
97ed91fa77 jshn.sh: add json_get_vars() wrapper function 2012-05-14 00:21:12 +02:00
Felix Fietkau
f8d3e57b45 add blobmsg_add_blob() to copy over an existing blobmsg attribute 2012-05-08 15:59:19 +02:00
Felix Fietkau
b1ea9afd60 remove uhtbl-test.c, it is obsolete 2012-03-14 11:55:59 +01:00
Felix Fietkau
92da3a9bcc replace list.h with a BSD licensed variant (taken from FreeBSD SVN) 2012-02-06 21:09:51 +01:00
Felix Fietkau
f565a7af42 blobmsg: add missing endian conversions 2011-11-17 00:47:54 +01:00
Felix Fietkau
5ce9b8912f blobmsg_json: print int16 elements in blobmsg_format_element (patch by Luka Perkov) 2011-11-17 00:40:37 +01:00
Felix Fietkau
a654d2f42b blob: switch to ISC license, switch blob_{get,put}_int* to _u*, add wrappers 2011-11-10 09:05:33 +01:00
Felix Fietkau
fc20c7a031 make casts from void * explicit to avoid C++ warnings (patch by Arthur Davis) 2011-10-27 10:16:56 +02:00