Commit graph

266 commits

Author SHA1 Message Date
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
Felix Fietkau
01c6f73ed7 list.h: rename parameter named "new" to "_new" to avoid using a reserved C++ keyword (patch by Arthur Davis) 2011-10-27 10:16:09 +02:00
Felix Fietkau
51711be625 fix more instances of uninitialized padding bytes 2011-10-06 17:57:13 +02:00
Felix Fietkau
7c80b7c514 blobmsg: fill padding between name and data 2011-10-06 17:19:28 +02:00
Felix Fietkau
08aada9a93 make the blobmsg format endian agnostic (stick to big-endian) 2011-10-06 17:15:00 +02:00
Felix Fietkau
309d7d456f fill padding bytes when setting raw attribute length 2011-10-06 17:14:44 +02:00
Felix Fietkau
f24324c27f explicitly zero extra buffer space added with realloc to silence valgrind warnings 2011-10-03 12:41:51 +02:00
Felix Fietkau
591a1e349f fix reads beyond the end of the buffer when iterating over blob attributes 2011-10-03 12:36:46 +02:00
Felix Fietkau
8cada85b61 add a blobmsg_type() inline function 2011-09-12 13:37:53 +02:00
Felix Fietkau
738884e746 same for json_get_var 2011-09-11 11:46:44 +02:00
Felix Fietkau
a1a97eb11e jshn: support using characters in elements that do not conform to shell variable restrictions 2011-09-11 11:40:22 +02:00
Felix Fietkau
dee81b4f79 add blobmsg_get_bool 2011-09-07 06:33:36 +02:00
Felix Fietkau
34a6d05f9a blob_attr_equal: un-inline, add pointer checks 2011-09-05 06:25:51 +02:00
Felix Fietkau
b1c320132e add blob_attr_equal() for comparing attributes 2011-09-05 06:09:32 +02:00
Felix Fietkau
1d3e4ccb6a fix a bug in blobmsg_parse
a second entry that has the same length as an existing found entry would
abort the parse loop (reported by Stefan Mächler)
2011-08-17 10:44:11 -07:00
Felix Fietkau
f1a44355bd change the include path for list.h in jshn.c 2011-08-12 11:12:50 -06:00
Felix Fietkau
d6ebb84ad6 add a missing include 2011-08-11 15:37:48 -06:00
Felix Fietkau
ec56b91662 jshn: clear more variables on json_init, fix adding array elements 2011-08-11 15:29:23 -06:00
Felix Fietkau
bdf717425a add blob_buf_free 2011-07-29 19:38:30 +02:00