Felix Fietkau
00a833c5b6
jshn: add support for the double datatype
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-03-17 00:50:03 +01:00
Thomas Gstädtner
49e6e062b8
add pkgconfig support for json-c
...
this includes a fallback for legacy support
2013-03-05 10:44:48 +01:00
Felix Fietkau
b2010c706c
json_script: do not rely on global includes for other libubox header files
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-03-02 16:21:11 +01:00
Felix Fietkau
38ea521911
add json_script, a minimalistic JSON based script interpreter
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-28 21:50:55 +01:00
Felix Fietkau
af2f52a37b
blobmsg: implement blobmsg_printf and blobmsg_vprintf
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-17 16:42:12 +01:00
Felix Fietkau
bd47d85d38
utils: make le16 endian conversion functions work with arguments that have side effects
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-14 23:39:57 +01:00
Felix Fietkau
fcd5ba8fbd
utils.h: make 16-bit little endian conversion robust against pointer subtraction arguments
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-14 22:02:56 +01:00
Felix Fietkau
d01922625d
utils: add little-endian swap helpers
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-13 12:35:19 +01:00
Felix Fietkau
e5a40544ec
utils: prefer using gccs builtin swapping functions which support constant folding
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-11 22:08:07 +01:00
Felix Fietkau
5ad190fccf
utils: move endian swap helpers and __packed definition to utils.h
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-11 21:46:41 +01:00
Felix Fietkau
4ab499899c
blobmsg: add blobmsg_realloc_string_buffer()
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-10 20:43:51 +01:00
Felix Fietkau
b786f85267
blob: add blob_buf_grow()
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-10 20:43:33 +01:00
Felix Fietkau
9a3519536b
blobmsg_json: prefer to link against libjson-c over libjson (the new library name in git versions of json-c)
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-02-10 15:32:45 +01:00
Felix Fietkau
95fde87029
ustream: another fix for ustream_read_buf_full() with split read buffers
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-31 18:10:52 +01:00
Felix Fietkau
f83b6548c7
ustream-fd: do not loop back into the callback from ustream_fd_set_uloop
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-31 17:08:40 +01:00
Felix Fietkau
bc6a230b50
ustream: set the right EOF flag
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-31 17:02:49 +01:00
Felix Fietkau
766ff98050
uloop: remove file descriptors if neither read nor write notification is requested
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-31 16:43:08 +01:00
Felix Fietkau
f24b6294c2
ustream-fd: only use read() == 0 as eof indication, and issue a state change notification when that happens
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-30 17:48:55 +01:00
Felix Fietkau
e72b65c899
ustream: fix ustream_read_buf_full() for multiple read buffers
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-30 16:52:32 +01:00
Felix Fietkau
0bc317aa4d
blobmsg_json: fix buffer growing on blobmsg json formatting
2013-01-29 23:07:10 +01:00
Jo-Philipp Wich
8b0d933154
uloop: rename uloop_timeout_pending() to uloop_timeout_remaining()
2013-01-23 19:33:12 +01:00
Jo-Philipp Wich
77984bd24d
uloop: add uloop_timeout_pending() function to determine the remaining time of an active timeout
2013-01-23 19:32:45 +01:00
Felix Fietkau
e009fd8c82
build: remove install prefix override
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-23 15:22:29 +01:00
Felix Fietkau
8a89e7f388
blob/blobmsg: use 32 bit load/store for 64 bit access, unaligned attributes cause data corruption on ARM
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-23 02:41:20 +01:00
Felix Fietkau
f15ceb8ced
ustream-fd: retry partial writes
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-22 10:09:55 +01:00
Luka Perkov
220958b7d9
rename internal variables in json_get_type
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2013-01-17 13:34:55 +01:00
Felix Fietkau
c360ec576c
blobmsg: add blobmsg_get_string
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-13 15:29:14 +01:00
Felix Fietkau
f5245f9887
add license headers for usock
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-13 15:27:38 +01:00
Felix Fietkau
432b93f633
list_compat.h: add copyright info
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-13 09:49:16 +01:00
Felix Fietkau
569bc29c5a
uloop: replace copyright info (code has been completely rewritten over time), relicense to ISC
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-13 09:47:51 +01:00
Felix Fietkau
0ab17bcb3a
jshn: add copyright info
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-13 09:45:59 +01:00
Felix Fietkau
1ec5b85848
blobmsg: fix blobmsg_parse_array, drop name field requirement
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-13 09:07:32 +01:00
Felix Fietkau
4b5f278195
blobmsg: allow BLOBMSG_TYPE_UNSPEC attributes, treat them as null for JSON conversion
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-13 09:02:51 +01:00
Felix Fietkau
2f74dbad14
blobmsg: add blobmsg_parse_array()
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-08 02:05:03 +01:00
Felix Fietkau
dde64e47ca
uloop: use clock_gettime with the monotonic clock instead of using gettimeofday()
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-06 03:04:04 +01:00
Felix Fietkau
aa4f3bde06
uloop: add a clock_gettime() implementation for mac os x
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-06 02:42:58 +01:00
Felix Fietkau
76f584c761
blobmsg_json: export blobmsg_add_object
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-06 02:15:48 +01:00
Felix Fietkau
b7930023ee
uloop: add back state tracking on mac os x, it seems to work reliably now (after the other fixes)
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-05 16:04:55 +01:00
Luka Perkov
f1735cd94e
sanitize json_get_type function
...
Signed-off-by: Luka Perkov <luka@openwrt.org>
2013-01-04 13:28:08 +01:00
Felix Fietkau
17f4e41ecb
uloop: improve edge trigger reliability on mac os x
...
Sometimes after re-arming a fd, an initial event for reads is not generated,
even though there is data pending. Work around this by making the trigger
level-triggered first, then switching to edge trigger after processing the first
event.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-04 03:18:42 +01:00
Felix Fietkau
c2916d7bcc
uloop: ensure SIGCHLD is properly received on mac os x
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-04 03:13:29 +01:00
Felix Fietkau
6a8df07590
uloop: do less state/change tracking for kevent() on mac os x, it is unreliable
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-04 01:15:48 +01:00
Felix Fietkau
8686989fff
ustream: increment receive buffer count
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-03 16:32:49 +01:00
Felix Fietkau
5bbedafe09
ustream-fd: prevent callbacks during init
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-03 16:32:45 +01:00
Felix Fietkau
6c28da1ae2
ustream-fd: fix read error handling
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-03 16:32:40 +01:00
Felix Fietkau
e7825661a2
uloop: fix immediate timeout processing on mac os x
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-01 23:37:22 +01:00
Felix Fietkau
7157c3a4df
utils: add BUILD_BUG_ON (similar to the one in the linux kernel)
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-01 16:10:44 +01:00
Felix Fietkau
7a117988d9
ustream: add ustream_pending_data accessor function
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-01 16:10:39 +01:00
Felix Fietkau
59000546c0
utils: make it unnecessary to specify the last NULL argument for calloc_a
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-31 15:40:12 +01:00
Felix Fietkau
9c8ab5d64c
utils: move ARRAY_SIZE from uloop to utils.h
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-31 15:24:27 +01:00