Dominig ar Foll [Wed, 27 Sep 2017 16:05:10 +0000 (18:05 +0200)]
correcting license reference to align with code
Change-Id: Id4553e25c0723e212973218b596f745a2210ea4f
Signed-off-by: Dominig ar Foll <dominig.arfoll@fridu.net>
José Bollo [Tue, 19 Sep 2017 11:45:13 +0000 (13:45 +0200)]
Bump version to 4.99-EERC1
Change-Id: I693e67cbdcd397ed1f41a049c99f4e72000b1495
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Sebastien Douheret [Mon, 18 Sep 2017 14:24:53 +0000 (16:24 +0200)]
Bump doc to 4.99-EERC1
Change-Id: I8804b16c7355081740ef338f2d0acb3ff1e7000c
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
José Bollo [Fri, 8 Sep 2017 13:59:00 +0000 (15:59 +0200)]
afb-proto-ws: Split afb-stub-ws in two
The file afb-stub-ws is split in two parts:
- afb-stub-ws: implements the interface between
xreq and protocol.
- afb-proto-ws: implements the pbinary protocol
over wer sockets
The intent is to have a clean separation between
a kind of generic stub and the protocol implmentation.
This will allow soon to provide a library to access
directly in C to the websocket of an API exposed
through the otpion --ws-server.
At the moment, the protocol implementation is on
websockets but in the futur it will be cleanly
rewritten to use any binary transport.
This commit also fixe a double free in subcalls.
Change-Id: I831787533db9fe073d060dd8ee9401cbab2894e1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 11 Sep 2017 15:54:16 +0000 (17:54 +0200)]
afb-xreq: Fix bugs in subcalls
Subcall was silently broken.
Change-Id: I0b4c2887a0787b0b9e50e94a534712e21b91d786
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 11 Sep 2017 15:50:13 +0000 (17:50 +0200)]
afb-hreq: Fix a leak on websocket upgrade
A 'no-reply' answer was created but not emitted nor
freed when http connection was upgraded to websocket.
Merging replied and xreq.replied was a possible
solution but I wanted not change much things.
Change-Id: I86c6c7ee52f69d50732e50fa6594f1d22d77ddfd
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 8 Sep 2017 08:41:52 +0000 (10:41 +0200)]
afb-ws: optimize buffer management
Change-Id: I6cdfc9ccb6253efe5e22844c6ea66dae2c6272a2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 8 Sep 2017 08:40:55 +0000 (10:40 +0200)]
sig-monitor: Fix a warning (minor)
Change-Id: Ic9437062b0ee6c1d1a8c42cc938c8e73f2ed3846
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 6 Sep 2017 06:58:29 +0000 (08:58 +0200)]
Improve isolation of bindings
Adding this flag will avoid potential conflict
with previously loaded bindings.
Change-Id: Iae42a68fa4750d107895dc01045aac7b885759f7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 5 Sep 2017 13:10:56 +0000 (15:10 +0200)]
Update the url of the project
Change-Id: Iebaa2c4f133873a3fb163fa2806c68ec03831f00
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 5 Sep 2017 11:09:04 +0000 (13:09 +0200)]
Set Version 4.1
Change-Id: I752ab6fa12de2d3a3b739c5d090d56222d0ac457
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 4 Sep 2017 16:17:55 +0000 (18:17 +0200)]
Allow renaming of API
The function afb_daemon_rename_api allows to rename
an API during the preinit phase.
Change-Id: I35477ba99d35b1dc51a7cacf8e55c3f02d86d7b4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 4 Sep 2017 14:15:08 +0000 (16:15 +0200)]
afb-ditf: use NULL function feature
It is now safe to put NULL for function name.
Change-Id: I83afc47e38b823e924ae8dab60a7a24065ae0ef6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 4 Sep 2017 12:40:14 +0000 (14:40 +0200)]
Improve handling of verbosity in bindings
The macro AFB_BINDING_PRAGMA_NO_VERBOSE_MACRO is removed.
The macro AFB_BINDING_PRAGMA_NO_VERBOSE_UNPREFIX is removed.
The macro AFB_BINDING_PRAGMA_KEEP_VERBOSE_UNPREFIX is now used to
activate the weakly named verbose macros DEBUG, INFO, NOTICE,
WARNING, ERROR.
The macros AFB_BINDING_PRAGMA_NO_VERBOSE_DATA and
AFB_BINDING_PRAGMA_NO_VERBOSE_DETAILS can be used to tune what
verbose parts are to be emitted:
If AFB_BINDING_PRAGMA_NO_VERBOSE_DATA is defined then the macro
will only report the file and the line that emitted the message.
This mode is intended to reduce the count of static data plugin
the binary.
If AFB_BINDING_PRAGMA_NO_VERBOSE_DATA is not defined and
AFB_BINDING_PRAGMA_NO_VERBOSE_DETAILS is defined, this is the opposite:
the messages are emitted but not the file, line and function.
When none of these 2 are difened, everything is emitted: the message
and the details.
Change-Id: Ibb83cd435797fadf90626cb06bbda77f0f8b3cde
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 4 Sep 2017 12:40:14 +0000 (14:40 +0200)]
Improve handling of verbosity
The macros VERBOSE_NO_DATA and VERBOSE_NO_DETAILS can
be used to tune what verbose parts are to be emitted:
If VERBOSE_NO_DATA is defined then the macro will only
report the file and the line that emitted the message.
This mode is intended to reduce the count of static data
in the binary.
If VERBOSE_NO_DATA is not defined and VERBOSE_NO_DETAILS
is defined, this is the opposite: the messages are emitted
but not the file, line and function.
When none of these 2 are difened, everything is emitted:
the message and the details (file, line and function).
At the same time the emission of the details (file, line,
function) is not done for levels NOTICE, INFO, DEBUG on
the console
Change-Id: Ibb83cd435797fadf90626cb06bbda77f0f8b3cde
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 4 Sep 2017 11:44:59 +0000 (13:44 +0200)]
afb-ditf: track daemon state
Change-Id: Ic21c79dcd9908919a1a8d13e8747ef0bd2490477
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 4 Sep 2017 10:04:24 +0000 (12:04 +0200)]
afb-hook: change output format
Putting HOOK: in front is better because other
outputs are also prefixed with SOMETHING:
It greatly improves readability
Change-Id: I591126198b630e3b7977ecb2501bc59163fd0c11
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 4 Sep 2017 10:01:15 +0000 (12:01 +0200)]
afb-hook: output hooks to stderr directly
Change-Id: Ife66db644c62ea4a3e7be11e7f454234c093a824
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 4 Sep 2017 09:37:39 +0000 (11:37 +0200)]
Implement afb_req_has_permission
This new verb is available in bindings to check
whether the client identified by a request has
a given permission or not.
Change-Id: I5eaa0892d8260d26bd76f37123251c103c981e10
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 4 Sep 2017 08:34:52 +0000 (10:34 +0200)]
afb-auth: improve afb_auth_check_permission
The test was previously done in the caller but because
afb_auth_check_permission can now be called by other
callers, the test must be relocated.
Change-Id: I08a3a92afbe0b4dcfb223335b1e76b2d4aff005f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 4 Sep 2017 08:30:26 +0000 (10:30 +0200)]
afb-auth: export method to check a single permission
Change-Id: I45c4872f34ff8f25c14872d7b3610fa15f48062e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 4 Sep 2017 08:28:14 +0000 (10:28 +0200)]
afb-auth: revert order of arguments (minor)
Change-Id: I29140a3c047799ee600051fb62998e7bb73d45f5
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 6 Sep 2017 16:15:17 +0000 (18:15 +0200)]
afb-api-so: take care of SIGSEGV in dlopen
In some case, dlopen raise a segmentation fault.
This commit takes care of this.
Change-Id: I6cbe59de2422dafcdf3714d0539b1757511c100b
Bug-AGL: SPEC-662
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 6 Sep 2017 16:13:21 +0000 (18:13 +0200)]
sig-monitor: handle SIGSEGV in backtrace
There was cases were the backtrace raised a segmentation
fault.
This commit also improves unblocking of signals in handler.
Change-Id: I09493d3ecc4b477660366ea213bf451c9ae7d517
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 1 Sep 2017 16:30:17 +0000 (18:30 +0200)]
Fix segmentation fault when random token
Change-Id: I98795f71dfab1fbc86d694d7ed357ae8387abd5d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 1 Sep 2017 09:36:54 +0000 (11:36 +0200)]
sig-monitor: Dump stack atomically
Emitting the stack as a single string avoids
its accidental split and is better when receiving
monitoring events.
Change-Id: I74c16f36f026b4af4a42064f694ac1f4a342cc1f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 1 Sep 2017 07:57:58 +0000 (09:57 +0200)]
afb-apiset: Refactor and clean
Change-Id: I063329b23f4476e2570e99dfc639b11320df41d2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 1 Sep 2017 07:56:41 +0000 (09:56 +0200)]
AFB.js: fix bug (minor)
Change-Id: I37ee5f599cf49a6a1c6b1e27cf3fcdd29b280c4a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 1 Sep 2017 07:55:57 +0000 (09:55 +0200)]
afb-api-ws: Fix bug introduced by
2e83db0
Change-Id: Ia73d2d49ac888770f78d65a6258c0184b6aaa2da
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 1 Sep 2017 07:04:18 +0000 (09:04 +0200)]
Give priority to option --binding
Change-Id: I822f2d50a35fdffae82678c67be0e017d54cebff
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 31 Aug 2017 17:21:03 +0000 (19:21 +0200)]
Make noconcurrency more efficient
The previous handling of noconcurrency suffered of
inefficiency, was complicated and dedicated to
api-so-v2.
Change-Id: I32aea9187663ac533819496e9dc9b944db0d89ec
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 31 Aug 2017 16:47:50 +0000 (18:47 +0200)]
afb-apiset: refactor access to apis
Change-Id: If003067ada5802b7d77f06f560a5d07464909a61
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 31 Aug 2017 15:17:37 +0000 (17:17 +0200)]
afb-trace: use constants for verbosity level
Change-Id: I0908c5057efe5360cccd3b2e1e3f926f48453bd2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Ronan Le Martret [Thu, 31 Aug 2017 12:29:24 +0000 (14:29 +0200)]
update monitoring into packaging
Change-Id: Ib03f56bbc148e87a0153a5a48073237c3f34e6ee
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
José Bollo [Thu, 31 Aug 2017 11:43:31 +0000 (13:43 +0200)]
verbosity: fixes split verbosity level 1 in 2 levels
The names wasn't correctly reported by monitor
Change-Id: Id382d7fdc3bb56c8c11c865439e7e18c257df3a2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 31 Aug 2017 07:30:19 +0000 (09:30 +0200)]
afb-svc: make service existing during its initialisation
The initialisation of services is splitted in two parts:
- the creation and allocation of the structure for the
service.
- the initialisation once the structure is ready and
recorded.
Change-Id: I05c89fb513869d45e6b8413699fba234f00ce6b1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 31 Aug 2017 06:32:11 +0000 (08:32 +0200)]
jobs: optimized version of fix starve
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 30 Aug 2017 16:25:42 +0000 (18:25 +0200)]
jobs: fix starve
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 30 Aug 2017 14:54:58 +0000 (16:54 +0200)]
afb-api-ws: check that the ws-server API exist
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 16:14:23 +0000 (18:14 +0200)]
monitor-base.css: fix overflow
Change-Id: I075be34d5f29c12c3306d16b3c14ccd40b9a98ff
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 15:58:08 +0000 (17:58 +0200)]
hooking: Add hook at global scope
Actually the global scope only allows to trace
log messages.
Change-Id: Ib73edf2e3168311b2ad694d857e6647e34884313
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 14:28:17 +0000 (16:28 +0200)]
verbosity: split verbosity level 1 in 2 levels
Change-Id: I32a96f1863caffa6a17c25f52d06538f8eb60555
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 14:25:44 +0000 (16:25 +0200)]
verbosity: Prepare hooking of log messages
Change-Id: Icfe96d2fee2d3b699dfa9105fcfe62d4eced2557
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 13:50:12 +0000 (15:50 +0200)]
main: set name even for syslog
Change-Id: I67d74cc2d539651101e82b17d50c8afb8dde621a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 12:51:22 +0000 (14:51 +0200)]
hook+trace: add a unique timestamp
A same event must have a unique time stamp.
Change-Id: Id33351a97f62c04a84d26995a2cf9ae80613c613
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 12:18:47 +0000 (14:18 +0200)]
hook+trace: adds hookid and type
The hookid is a unic identifier for a hook event.
Its purpose is to distinguish events that could match
different filters: a same event has a same id.
Also integrate the field "type" (of the event) in the
trace event.
Change-Id: I90b0b2d3a0846b673b993110d2752cc54db75bd8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 12:09:22 +0000 (14:09 +0200)]
afb-config Copies the values of option --exec
Not copying is not possible if the name
of the process is changed.
Change-Id: I52122c84234ac275975dae47c23c9d7240b82df8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 11:08:00 +0000 (13:08 +0200)]
process-name: fix a warning
Change-Id: I1e70cded34b080215b53b8bb28945303d4e5f3e6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 09:22:49 +0000 (11:22 +0200)]
Add option --name for naming the process
This option allows to set the command line
and the thread name of the main process.
The value can contain spaces that will be
replaced by nulls.
Change-Id: I895270a24663467b16fb3cd8fc3218b7b003b6bb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 09:17:02 +0000 (11:17 +0200)]
afb-config: update the output of the config
Change-Id: I1dbc3c0b0c84cb34da1c8851044a6e72e4dfbd34
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 08:25:50 +0000 (10:25 +0200)]
Rework CMakeList.txt
Explicit options and add a definition for AGL_DEVEL
Change-Id: I8419f0b0dfecc1e0171c282573cdf32ae3f09704
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 29 Aug 2017 06:33:22 +0000 (06:33 +0000)]
Merge "Update packaging"
Stephane Desneux [Mon, 28 Aug 2017 12:50:26 +0000 (14:50 +0200)]
build config: remove forced AGL_DEVEL from src/CMakelists.txt
Change-Id: I6fd44469b148732103d4b903f94c355f2bd231ee
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Stephane Desneux [Mon, 28 Aug 2017 12:47:55 +0000 (14:47 +0200)]
monitor: disable monitoring by default
Change-Id: I8e76e9c184dd913a5040578366c8783ac4b3efaa
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Stephane Desneux [Mon, 28 Aug 2017 12:44:12 +0000 (14:44 +0200)]
fix typo
Change-Id: Ifb2de3c13f814f16f23ead9357f4fec97b3e675c
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Ronan Le Martret [Mon, 28 Aug 2017 09:50:18 +0000 (11:50 +0200)]
Update packaging
* add libmicrohttpd dependency for deb packaging
* add monitoring packaging to spec file
Change-Id: I228907183640f4edda9bcc3ca634043d5e22e811
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
José Bollo [Sun, 27 Aug 2017 12:52:57 +0000 (14:52 +0200)]
monitoring: add default page index.html
This allows to acces monitoring interface using
url HOST/monitoring/ when option --monitoring is set.
Change-Id: If7dfc89e4c4db0d87ec5c8e74f9243691a3ec0e8
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Sun, 27 Aug 2017 12:50:43 +0000 (14:50 +0200)]
afb-config: rework on option --random-token
When set, this option will enforce a random
token in any cases.
Not using the option --token has the same effect
asking for a random token.
So the option now serves to enforce a random token.
Change-Id: Iea2cee44b95d5479c36217d312ab6e8ce6726005
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Sun, 27 Aug 2017 12:48:05 +0000 (14:48 +0200)]
monitoring: Add option --monitoring
Installs basic interface for monitoring and
add the option --monitoring / -M to activate
the alias /monitoring. This makes the page
/monitoring/monitor.html available.
Change-Id: Iebe0959f0a5e7c396fe7ce6862d0f9c883733824
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Sun, 27 Aug 2017 12:44:17 +0000 (14:44 +0200)]
afb-config: Add short -p option for --port
Change-Id: Iae8475559ee2381ee7d687c6afc2e6ce7145ebf3
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Sun, 27 Aug 2017 11:35:37 +0000 (13:35 +0200)]
monitoring: improvements
- use flex/css for correct layout
- handles disconnection nicely
- handles initial token
- fix typo in afb-api-so
Change-Id: I386b98f9d6a2182029d39a373a9820478f97cfa6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Stephane Desneux [Sat, 26 Aug 2017 15:23:50 +0000 (17:23 +0200)]
src/afb-api-so.c: fix uninitialized variable
Change-Id: If7f576e8f4bdc613d836c158df6e5f0bbfea87b7
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
José Bollo [Sat, 26 Aug 2017 06:01:49 +0000 (08:01 +0200)]
monitoring: add copyrights
Also still improve colours
Change-Id: I2afc2dc7bf22ef65e39c18c9397ae6c7cd2df1d4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Sat, 26 Aug 2017 05:47:48 +0000 (07:47 +0200)]
monitoring: fix color
Change-Id: I73481b5a7d509c7f6640fc8b0c21c502667a657e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 25 Aug 2017 15:10:17 +0000 (17:10 +0200)]
afb-config: copy string values
Change-Id: Ibbc5924adef104d9ec7399e7943baa1d799d2572
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 25 Aug 2017 15:01:40 +0000 (17:01 +0200)]
afb-config: Improve naming (cosmetic)
Change-Id: Ib3133cbcd458fbd1ca1ee5aac64700c9ebc83b60
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 25 Aug 2017 12:21:38 +0000 (14:21 +0200)]
afb-config: Optimize boolean flags
Change-Id: I476cb5c7cd873802273f243eb3454857c8723e96
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 25 Aug 2017 11:19:32 +0000 (13:19 +0200)]
Add option --no-ldpaths to avoid default ldpaths
Instead of writing --ldpaths=/dev/null simply use
the option --no-ldpaths
Change-Id: Ia278989b90a079d998ba0cbb7a6bb78c46d58090
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 25 Aug 2017 11:09:13 +0000 (13:09 +0200)]
Add option --weak-ldpaths (for weak loading path)
This option allows to specify a loading path where
binding that fails on load are ignored.
Change-Id: Ie0646f88ba9207dd117737a8b251a7a42f424f02
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 25 Aug 2017 10:50:57 +0000 (12:50 +0200)]
afb-api-so: fix a bug in error detection
Error detection wasn't reported when an
error occured in a subdirectory.
Also closes the opened directories on error
and allows a mode for ignoring binding errors.
Change-Id: I34e52de8ea71bf84556878a395b56c6628cc5d9a
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 25 Aug 2017 08:45:03 +0000 (10:45 +0200)]
monitoring: improve user interface
- fix buttons
- manage scrolling
- added separators
Change-Id: I327a74d004ec33c41bb5e0dbc913bb02d9848878
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 24 Aug 2017 22:22:43 +0000 (00:22 +0200)]
monitoring: updated demo with dark theme
Change-Id: Ibb77655cd614553bf0090bf5ffa64180d1279f8b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 22 Aug 2017 07:21:43 +0000 (09:21 +0200)]
monitor: Test page for monitoring
This is a test page for showing basic monitoring
use.
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 24 Aug 2017 08:22:43 +0000 (10:22 +0200)]
afb-monitor: update hooks for tracing
Updating hooks is needed (at the moment) also for events.
Change-Id: If5f6259499b3d35a2fd5504185b9f751f96c4e06
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Romain Forlot [Thu, 24 Aug 2017 13:25:12 +0000 (15:25 +0200)]
Fix: C++ compilation warning using genskel
Unitialized struct member.
Change-Id: Ib507aef4ceb459571b6bb70e5a879e1f34823a77
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
José Bollo [Wed, 23 Aug 2017 17:41:14 +0000 (19:41 +0200)]
genskel: fix bug in namings
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 23 Aug 2017 16:45:09 +0000 (18:45 +0200)]
afb-monitor: update hooks for tracing
Updating hooks is needed (at the moment) after trace requests
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 23 Aug 2017 16:41:51 +0000 (18:41 +0200)]
genskel: improvements and bug fixs
- Fills the info fields
- take care of C in names
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 11 Aug 2017 14:57:53 +0000 (16:57 +0200)]
afb-stub-ws: improvements
The client stub isn't connecting anymore
automatically to the apiset. The function
'afb_stub_ws_client_add' provides the feature.
The client now returns a afb_api structure.
name and on_hangup features added.
Change-Id: I204cc39adeb782f5d40360c22c79d14f54dd5c63
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 11 Aug 2017 09:08:56 +0000 (11:08 +0200)]
afb-apiset: add a wrapper for 'describe'
And use it in monitor.
Change-Id: I9efbd19cfbdc665d1d686831b529ebaa7bd917a2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 11 Aug 2017 14:46:59 +0000 (16:46 +0200)]
afb-websocket: update websocket protocol
After integration of UPGRADE in libmicrohttpd,
the header "Connection: Upgrade" has to be removed
because it is now sent 2 times.
This caused Webkit to fail to connect its websocket.
Bug-AGL: SPEC-821
Change-Id: Ib9744208cf7175f0c56e513b18b53ab0a9b60b9f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 10 Aug 2017 13:36:05 +0000 (15:36 +0200)]
afb-debug: expose wait/break features
Change-Id: I197350dee4f85dfc167ea4ffcb54e6e3ceba89ad
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 10 Aug 2017 10:11:31 +0000 (12:11 +0200)]
subpath: creation for splitting locale-root
Change-Id: Ia339dc1d1291ef52fbec3c928537721ed7410694
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 10 Aug 2017 09:43:10 +0000 (11:43 +0200)]
afb-xreq: handle when no reply was sent
Send an error reply if no reply was sent.
Change-Id: Ibc5c98d22b9820f1f0b5370083f79a52213ddc61
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 9 Aug 2017 09:16:27 +0000 (11:16 +0200)]
afb-api-ws: typo
Change-Id: Iea02e0720e40c2b4630a15606e798c53b4bbfe6c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 8 Aug 2017 16:16:07 +0000 (18:16 +0200)]
afb-evt: fix a bug discovered by clang-check
Change-Id: I6bb1dffeb17fdcaf6e3a2686651d35dd0b0500b9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 8 Aug 2017 15:50:21 +0000 (17:50 +0200)]
afb-session: fix an over allocation
Thanks to Markus Fritzsch and clang-check
Change-Id: I4822eb14bff49680df05e472363228cc82566edf
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 8 Aug 2017 10:17:55 +0000 (12:17 +0200)]
sig-monitor: dump the stack on SIGABRT
Change-Id: Id21c444d6d18a78f731458a43519a131515385c0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 8 Aug 2017 10:14:51 +0000 (12:14 +0200)]
Add specific permission for monitor/trace
Change-Id: I39c9295596e1c328533319354dddbf5191f11463
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 31 Jul 2017 15:50:13 +0000 (17:50 +0200)]
afb-trace: Add tracing features to API monitor
This api allows to receive events when particular actions
are reached.
At the moment, tracing is bound to the API monitor
and can trace anything. In the future, this will not be
the case and the API monitor will only allow to trace
requests of its session. The tracing of all will
be available for supervision only.
Change-Id: I880852612c2f77ff5329496b16c75fe602db4090
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 3 Aug 2017 10:16:58 +0000 (12:16 +0200)]
afb-cred: fix default values
Because SO_PEERCRED returns without error even when no data
is available (tcp by example), the resulting uid is now tested.
Also, for tcp, by default avoid by default to create a default
user value. Instead, return NULL. This will allow client having
an HTTP/Websocket connection to get full rights on the binder.
Change-Id: I2defb585bf79c023e2391c2e18d6de17e5112770
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 2 Aug 2017 17:14:09 +0000 (19:14 +0200)]
subcall_req: introduce afb_req_subcall_req
The function 'afb_req_subcall_req' can be used to make asynchronous
subcalls. It improves the function 'afb_req_subcall' by automatically
keeping the request opened for the callback and by passing it, the
request, as an extra argument of the callback.
Change-Id: I2dc79c01fc25c7a65b9c8cc9e001a5b85fba99df
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 2 Aug 2017 16:48:27 +0000 (18:48 +0200)]
afb-xreq: integration of subcalls
The file afb-subcall is now integrated within
afb-xreq. It improves memory allocation and
performance of synchronous calls.
Change-Id: I4190199babbe0559527438b530b19ac9a35ec38b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 31 Jul 2017 15:46:32 +0000 (17:46 +0200)]
afb-svc: allows NULL for callbacks or results
This allows afb_service_call to set NULL callback
and afb_service_call_sync to set a NULL result pointer.
Change-Id: Ie16ae5557e6851d2f1e730ad32450489242b5daa
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 31 Jul 2017 14:46:23 +0000 (16:46 +0200)]
Fix fallthrough warnings
Change-Id: Ibe8e0b4e59ad4d5f0b0cca82ccdb3d0f035b0501
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 31 Jul 2017 14:33:37 +0000 (16:33 +0200)]
afb-hook: renaming
Change-Id: Ie1ac2eb96fb29711c38750c3babe7cbd4b472079
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 31 Jul 2017 14:31:47 +0000 (16:31 +0200)]
wrap-json: add "for_all" functions
The "for_all" functions are facilities for handling
collections of json objects
Change-Id: Icaecb39e9f0108e1fb1c42bef2a90935feb312ed
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 31 Jul 2017 14:27:03 +0000 (16:27 +0200)]
afb-evt: add internal push functions
For the implementation of monitoring, the event
should be pushed without hooking internal.
Change-Id: I4372bbc55e78c851db660a69bb2e60995fbdc88f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 31 Jul 2017 14:25:06 +0000 (16:25 +0200)]
afb-evt: unprefix event name
Removes the api prefix of the event name.
Change-Id: I050dc86beb08659751c1e57b8d3ea233bac9e411
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 31 Jul 2017 13:51:05 +0000 (15:51 +0200)]
afb-cred: provide default values of credentials
Change-Id: I3764edf986c01ef30e21ee1ec7e2b0098eec9e9e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>