John Crispin [Fri, 28 Sep 2012 23:11:31 +0000 (01:11 +0200)]
rename proc_cb to ul_process_cb
Signed-off-by: John Crispin <blogic@openwrt.org>
Felix Fietkau [Thu, 27 Sep 2012 11:47:46 +0000 (13:47 +0200)]
add an example script for the uloop lua binding
Felix Fietkau [Thu, 27 Sep 2012 11:30:33 +0000 (13:30 +0200)]
add lua binding for uloop (written by John Crispin)
Felix Fietkau [Sun, 8 Jul 2012 20:27:40 +0000 (22:27 +0200)]
uloop: clear processes and timeouts on uloop_done()
Jo-Philipp Wich [Sat, 7 Jul 2012 16:17:40 +0000 (18:17 +0200)]
uloop: handle EPOLLHUP like EPOLLERR to prevent infinite tight loops between epoll_wait() and the continue in uloop_run_events()
Felix Fietkau [Sun, 24 Jun 2012 19:11:06 +0000 (21:11 +0200)]
blobmsg: remove the unnecessary name argument from blobmsg_check_attr_list, infer it from the list type
Felix Fietkau [Sun, 24 Jun 2012 19:07:47 +0000 (21:07 +0200)]
blobmsg: add blobmsg_check_attr_list() to validate element types of arrays and tables
Felix Fietkau [Sun, 24 Jun 2012 19:06:16 +0000 (21:06 +0200)]
uloop: prevent fd callbacks for unregistered fds by ensuring that pointers in the epoll array are cleared
Felix Fietkau [Sun, 10 Jun 2012 15:11:36 +0000 (17:11 +0200)]
vlist.h: protect against multiple inclusions
Felix Fietkau [Fri, 1 Jun 2012 18:54:05 +0000 (20:54 +0200)]
blob: add blob_memdup()
Jo-Philipp Wich [Wed, 30 May 2012 19:47:43 +0000 (21:47 +0200)]
sh/jshn.sh: fix json_get_var() and json_get_type() to not return cached values
Jo-Philipp Wich [Tue, 29 May 2012 00:17:35 +0000 (02:17 +0200)]
Merge branch 'master' of nbd.name:luci2/libubox
Jo-Philipp Wich [Tue, 29 May 2012 00:10:20 +0000 (02:10 +0200)]
sh/jshn.sh: replace "tr" calls with inline substitution, signalize success with return values
Jo-Philipp Wich [Tue, 29 May 2012 00:06:39 +0000 (02:06 +0200)]
sh/jshn.sh: replace "tr" calls with inline substitution, signalize success with return values
Benjamin Larsson [Mon, 28 May 2012 12:59:49 +0000 (14:59 +0200)]
uloop: include sys/types.h to make pid_t available
Felix Fietkau [Sat, 26 May 2012 16:04:34 +0000 (18:04 +0200)]
remove uapi.h, afacis nothing uses it
Felix Fietkau [Sat, 26 May 2012 16:03:08 +0000 (18:03 +0200)]
switch blobmsg_json over to permissive license
Felix Fietkau [Sat, 26 May 2012 16:02:30 +0000 (18:02 +0200)]
switch blobmsg over to permissive license
Felix Fietkau [Sat, 26 May 2012 15:59:59 +0000 (17:59 +0200)]
remove ulog.h, afaics nothing uses it
Felix Fietkau [Sat, 26 May 2012 15:57:04 +0000 (17:57 +0200)]
add vlist (from netifd)
Felix Fietkau [Sat, 26 May 2012 15:50:10 +0000 (17:50 +0200)]
add avl_strcmp
Felix Fietkau [Thu, 17 May 2012 12:29:59 +0000 (14:29 +0200)]
sh/jshn.sh: fix allowing numbers in identifiers
json_add_generic() needs to handle them as well
Jo-Philipp Wich [Tue, 15 May 2012 22:18:16 +0000 (00:18 +0200)]
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.
Felix Fietkau [Sun, 13 May 2012 22:21:12 +0000 (00:21 +0200)]
jshn.sh: add json_get_vars() wrapper function
Felix Fietkau [Tue, 8 May 2012 13:59:19 +0000 (15:59 +0200)]
add blobmsg_add_blob() to copy over an existing blobmsg attribute
Felix Fietkau [Wed, 14 Mar 2012 10:55:59 +0000 (11:55 +0100)]
remove uhtbl-test.c, it is obsolete
Felix Fietkau [Mon, 6 Feb 2012 20:09:42 +0000 (21:09 +0100)]
replace list.h with a BSD licensed variant (taken from FreeBSD SVN)
Felix Fietkau [Wed, 16 Nov 2011 23:47:49 +0000 (00:47 +0100)]
blobmsg: add missing endian conversions
Felix Fietkau [Wed, 16 Nov 2011 23:40:37 +0000 (00:40 +0100)]
blobmsg_json: print int16 elements in blobmsg_format_element (patch by Luka Perkov)
Felix Fietkau [Thu, 10 Nov 2011 08:05:33 +0000 (09:05 +0100)]
blob: switch to ISC license, switch blob_{get,put}_int* to _u*, add wrappers
Felix Fietkau [Thu, 27 Oct 2011 08:16:56 +0000 (10:16 +0200)]
make casts from void * explicit to avoid C++ warnings (patch by Arthur Davis)
Felix Fietkau [Thu, 27 Oct 2011 08:15:01 +0000 (10:15 +0200)]
list.h: rename parameter named "new" to "_new" to avoid using a reserved C++ keyword (patch by Arthur Davis)
Felix Fietkau [Thu, 6 Oct 2011 15:57:13 +0000 (17:57 +0200)]
fix more instances of uninitialized padding bytes
Felix Fietkau [Thu, 6 Oct 2011 15:19:28 +0000 (17:19 +0200)]
blobmsg: fill padding between name and data
Felix Fietkau [Thu, 6 Oct 2011 15:15:00 +0000 (17:15 +0200)]
make the blobmsg format endian agnostic (stick to big-endian)
Felix Fietkau [Thu, 6 Oct 2011 15:14:44 +0000 (17:14 +0200)]
fill padding bytes when setting raw attribute length
Felix Fietkau [Mon, 3 Oct 2011 10:41:51 +0000 (12:41 +0200)]
explicitly zero extra buffer space added with realloc to silence valgrind warnings
Felix Fietkau [Mon, 3 Oct 2011 10:36:46 +0000 (12:36 +0200)]
fix reads beyond the end of the buffer when iterating over blob attributes
Felix Fietkau [Mon, 12 Sep 2011 11:37:53 +0000 (13:37 +0200)]
add a blobmsg_type() inline function
Felix Fietkau [Sun, 11 Sep 2011 09:46:44 +0000 (11:46 +0200)]
same for json_get_var
Felix Fietkau [Sun, 11 Sep 2011 09:40:22 +0000 (11:40 +0200)]
jshn: support using characters in elements that do not conform to shell variable restrictions
Felix Fietkau [Wed, 7 Sep 2011 04:33:36 +0000 (06:33 +0200)]
add blobmsg_get_bool
Felix Fietkau [Mon, 5 Sep 2011 04:25:51 +0000 (06:25 +0200)]
blob_attr_equal: un-inline, add pointer checks
Felix Fietkau [Mon, 5 Sep 2011 04:09:32 +0000 (06:09 +0200)]
add blob_attr_equal() for comparing attributes
Felix Fietkau [Wed, 17 Aug 2011 17:44:11 +0000 (10:44 -0700)]
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)
Felix Fietkau [Fri, 12 Aug 2011 17:12:50 +0000 (11:12 -0600)]
change the include path for list.h in jshn.c
Felix Fietkau [Thu, 11 Aug 2011 21:37:48 +0000 (15:37 -0600)]
add a missing include
Felix Fietkau [Thu, 11 Aug 2011 21:29:23 +0000 (15:29 -0600)]
jshn: clear more variables on json_init, fix adding array elements
Felix Fietkau [Fri, 29 Jul 2011 17:38:30 +0000 (19:38 +0200)]
add blob_buf_free
Felix Fietkau [Fri, 29 Jul 2011 10:56:18 +0000 (12:56 +0200)]
add BLOBMSG_TYPE_BOOL as an alias for BLOBMSG_TYPE_INT8
Felix Fietkau [Mon, 18 Jul 2011 11:04:23 +0000 (13:04 +0200)]
blobmsg_json: support indenting of output data
Felix Fietkau [Tue, 31 May 2011 13:41:19 +0000 (15:41 +0200)]
jshn: add an option for printing the json data without a terminating newline
Felix Fietkau [Tue, 24 May 2011 19:46:10 +0000 (21:46 +0200)]
uloop: use list.h, add support for handling sigchld
Felix Fietkau [Mon, 23 May 2011 21:15:33 +0000 (23:15 +0200)]
jshn: fix invalid variable reuse
Felix Fietkau [Mon, 23 May 2011 21:09:19 +0000 (23:09 +0200)]
jshn: do not use -n on export
Felix Fietkau [Mon, 23 May 2011 20:21:27 +0000 (22:21 +0200)]
add jshn
Felix Fietkau [Wed, 13 Apr 2011 18:14:20 +0000 (20:14 +0200)]
make the avl node key const
Felix Fietkau [Sun, 27 Mar 2011 00:08:51 +0000 (01:08 +0100)]
remove int16, use int8 as bool instead of integer
Felix Fietkau [Sat, 26 Mar 2011 22:50:33 +0000 (23:50 +0100)]
support building without json support
Felix Fietkau [Sat, 26 Mar 2011 19:38:33 +0000 (20:38 +0100)]
remove the hlist code
Felix Fietkau [Sat, 12 Feb 2011 22:58:09 +0000 (23:58 +0100)]
change minimum cmake version to 2.6
Felix Fietkau [Sat, 12 Feb 2011 20:33:32 +0000 (21:33 +0100)]
uloop: fix event timeouts on darwin
Felix Fietkau [Fri, 11 Feb 2011 01:38:32 +0000 (02:38 +0100)]
uloop: allow timeouts to cancel the event loop
Felix Fietkau [Fri, 11 Feb 2011 00:25:17 +0000 (01:25 +0100)]
allow multiple calls to uloop_init() without annoying side effects
Felix Fietkau [Mon, 7 Feb 2011 19:30:52 +0000 (20:30 +0100)]
add a cast to fix 64 bit issues
Felix Fietkau [Mon, 7 Feb 2011 16:52:33 +0000 (17:52 +0100)]
uloop: make first_timeout static
Felix Fietkau [Mon, 7 Feb 2011 16:51:20 +0000 (17:51 +0100)]
make uloop_end() inline
Felix Fietkau [Mon, 7 Feb 2011 16:47:02 +0000 (17:47 +0100)]
validate blobmsg attributes before converting them to json
Felix Fietkau [Mon, 7 Feb 2011 16:00:50 +0000 (17:00 +0100)]
usock: remove code duplication
Felix Fietkau [Mon, 7 Feb 2011 00:18:56 +0000 (01:18 +0100)]
properly null-terminate formatted json strings
Felix Fietkau [Mon, 7 Feb 2011 00:12:07 +0000 (01:12 +0100)]
allow blobmsg_add_field to add arrays/tables
Felix Fietkau [Sun, 6 Feb 2011 20:36:04 +0000 (21:36 +0100)]
rename blob_get_int* to blob_get_u*
Felix Fietkau [Sun, 6 Feb 2011 20:23:28 +0000 (21:23 +0100)]
move json formatting to the blobmsg_json library
Felix Fietkau [Sun, 6 Feb 2011 17:01:37 +0000 (18:01 +0100)]
make __avl_find_element() inline
Felix Fietkau [Sun, 6 Feb 2011 16:20:46 +0000 (17:20 +0100)]
remove hash.[ch] - i don't think we will need it
Felix Fietkau [Sun, 6 Feb 2011 16:19:35 +0000 (17:19 +0100)]
remove uhtbl - i don't think we will need it
Felix Fietkau [Sun, 6 Feb 2011 15:48:28 +0000 (16:48 +0100)]
add a callback to the blobmsg-to-json function to override the formatting of specific attributes
Felix Fietkau [Sun, 6 Feb 2011 15:20:57 +0000 (16:20 +0100)]
add missing copyright headers
Felix Fietkau [Sun, 6 Feb 2011 15:14:15 +0000 (16:14 +0100)]
add a json to blobmsg parsing library
Felix Fietkau [Sun, 6 Feb 2011 15:13:58 +0000 (16:13 +0100)]
uloop: export the cancelled flag
Felix Fietkau [Sun, 6 Feb 2011 01:07:26 +0000 (02:07 +0100)]
blobmsg: fix dynamic string buffer length calculation
Felix Fietkau [Sun, 6 Feb 2011 00:56:37 +0000 (01:56 +0100)]
uloop: fix the write flag for mac os x
Felix Fietkau [Sat, 5 Feb 2011 01:06:49 +0000 (02:06 +0100)]
blomsg: add integer attribute accessor functions
Felix Fietkau [Fri, 4 Feb 2011 20:57:59 +0000 (21:57 +0100)]
add functions for allocating and adding a string buffer field
Felix Fietkau [Mon, 31 Jan 2011 20:24:20 +0000 (21:24 +0100)]
add back usock
Felix Fietkau [Mon, 31 Jan 2011 19:58:17 +0000 (20:58 +0100)]
remove unl
Felix Fietkau [Mon, 31 Jan 2011 19:30:21 +0000 (20:30 +0100)]
link against libnl-tiny
Felix Fietkau [Mon, 31 Jan 2011 19:23:34 +0000 (20:23 +0100)]
convert to cmake
Felix Fietkau [Mon, 31 Jan 2011 16:17:40 +0000 (17:17 +0100)]
fix json string formatting
Felix Fietkau [Mon, 31 Jan 2011 15:24:11 +0000 (16:24 +0100)]
fix off-by-one in the string validation check
Felix Fietkau [Mon, 31 Jan 2011 02:51:06 +0000 (03:51 +0100)]
blobmsg: constify and add more validation
Felix Fietkau [Mon, 31 Jan 2011 02:48:02 +0000 (03:48 +0100)]
blob: constify
Felix Fietkau [Mon, 31 Jan 2011 02:46:37 +0000 (03:46 +0100)]
make blob attribute checking available externally
Felix Fietkau [Mon, 31 Jan 2011 02:30:41 +0000 (03:30 +0100)]
blob: validate strings on parse
Felix Fietkau [Sun, 30 Jan 2011 13:15:57 +0000 (14:15 +0100)]
add support for json-formatting blobmsg elements
Felix Fietkau [Sun, 30 Jan 2011 00:13:32 +0000 (01:13 +0100)]
fix json list parsing
Felix Fietkau [Sat, 29 Jan 2011 17:16:12 +0000 (18:16 +0100)]
add blobmsg_for_each_attr
Felix Fietkau [Sat, 29 Jan 2011 17:00:40 +0000 (18:00 +0100)]
blobmsg: make arrays structually the same as tables - simplifies library user code
Felix Fietkau [Sat, 29 Jan 2011 17:00:01 +0000 (18:00 +0100)]
remove blob_buf::priv
Felix Fietkau [Sat, 29 Jan 2011 12:05:24 +0000 (13:05 +0100)]
remove #if 0'd debug code