summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Fix find_library for ubusd and examples/serverFlorian Fainelli2016-07-011-1/+1
| | | | | | | | | | | | | | | | Both ubusd and cli TARGET_LINK_LIBRARIES reference ${json} which is obtained via find_library(), but since the find_library() is searched after the TARGET_LINK_LIBRARIES for ubusd, ubusd always gets an empty ${json} variable. examples/server also links against libjson-c, but we were not setting TARGET_LINK_LIBRARIES accordingly, so do that too with ${json} appended. This was causing linking errors for ubusd and then examples/server using an external toolchain (stbgcc-4.8-1.x). Fixes: 9f52d1769b762 ("cli: use the new json-c library name") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
* cmake: Add ubox, blobmsg_json libraries and include dirs lookupPetr Štetiar2016-03-071-2/+2
| | | | | | | Otherwise cmake uses files from system which sometimes isn't wanted, ie. for testing. Signed-off-by: Petr Å tetiar <ynezz@true.cz>
* ubus: Fix memleak in examples/client in case of failureHans Dedecker2015-05-081-0/+1
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* ubus: Fix issues reported by static code analysis tool KlocworkHans Dedecker2015-04-202-1/+6
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* libubus: fix build error in examples/serverZefir Kurtisi2014-09-171-1/+4
| | | | | | | | This fixes build warning: /ubus.git/examples/server.c: In function 'test_hello_reply': /ubus.git/examples/server.c:69:6: error: ignoring return value of 'pipe', declared with attribute warn_unused_result [-Werror=unused-result] Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
* ubus: add count test to validate large message sizesAlexandru Ardelean2014-07-035-2/+187
| | | | | | | | | | | Client creates a string "1 2 3 ... 10000 ...", sends it to the server along with the maximum number in the string. Server creates another string like the client sent. It validates it and, returns strcmp()'s result. This is loop-ed every 2 seconds.
* libubus: close file descriptor after passing it in the status msgFelix Fietkau2014-02-271-1/+0
| | | | | | Simplifies handling of non-deferred requests Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* examples/client: receive data from the passed file descriptorFelix Fietkau2014-02-181-0/+44
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* examples/server: send a file descriptor as part of the request to the ↵Felix Fietkau2014-02-181-2/+30
| | | | | | "hello" method Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* add INCLUDE_DIRECTORIES to subdirectoriesThomas Gstädtner2013-03-031-0/+1
|
* make building examples an optionThomas Gstädtner2013-03-031-5/+6
|
* examples: disable the message on the server example, measure the notify ↵Felix Fietkau2012-12-152-1/+14
| | | | | | latency on the client example Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* examples: use blocking notifyFelix Fietkau2012-12-153-1/+39
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* ubus: add notification for subscribers present/goneFelix Fietkau2012-12-141-1/+8
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* watch add/remove -> subscribe/unsubscribe:Felix Fietkau2012-12-131-6/+7
| | | | | | | 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>
* examples: split client/server codeFelix Fietkau2012-10-243-38/+86
|
* move example to examples/Felix Fietkau2012-10-242-0/+210