src/app-framework-binder.git
6 years agoafb-xreq: take care of early failures
José Bollo [Wed, 20 Sep 2017 08:26:09 +0000 (10:26 +0200)]
afb-xreq: take care of early failures

Change-Id: I7f6d7c11dd1bbf51e571ca3ad9545cadc20b2a2c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafb-trace: improve naming (minor)
José Bollo [Wed, 20 Sep 2017 07:29:00 +0000 (09:29 +0200)]
afb-trace: improve naming (minor)

Change-Id: Ife42648b089d23d75820337e015703ee884d99fc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoAdd documentation on debugging features
José Bollo [Tue, 19 Sep 2017 15:59:01 +0000 (17:59 +0200)]
Add documentation on debugging features

Change-Id: I8c524bb290097524f5ad9d70fe93f19824f1faa7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoAdd C++ interface
José Bollo [Sun, 11 Jun 2017 15:23:10 +0000 (17:23 +0200)]
Add C++ interface

Change-Id: I05e104e4733d071949723073d32b21c22089ecdf
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafb-xreq: Detection of self locks due to 'noconcurrency'
José Bollo [Tue, 19 Sep 2017 12:40:58 +0000 (14:40 +0200)]
afb-xreq: Detection of self locks due to 'noconcurrency'

Change-Id: I112526f315d861ebb6d0d12edea06372f902db2c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafb-context: add const qualifier for api_key
José Bollo [Tue, 19 Sep 2017 12:39:47 +0000 (14:39 +0200)]
afb-context: add const qualifier for api_key

Change-Id: I138d70698342cc2350d4f9098bcf5c486d16faba
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agojobs: add const qualifier for groups
José Bollo [Tue, 19 Sep 2017 12:39:03 +0000 (14:39 +0200)]
jobs: add const qualifier for groups

Change-Id: I34faa8e5da4321da53beb323559399d1460562c1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agomonitoring: Add CSS/style/theme switch dynamically
José Bollo [Tue, 19 Sep 2017 10:23:13 +0000 (12:23 +0200)]
monitoring: Add CSS/style/theme switch dynamically

This can be useful when presenting the monitoring
to switch from a dark theme to a light theme
dynamically.

Change-Id: I25beffe2071e7a71d7ad493099ab3bb674de8461
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoAdd function 'afb_req_get_application_id'
José Bollo [Tue, 19 Sep 2017 10:16:42 +0000 (12:16 +0200)]
Add function 'afb_req_get_application_id'

This function is intended to return an identifier of the
calling application. At this time, the identifier is
just derived from the application id but it can be
changed in the future.

Change-Id: Idacde8979ac5bb525352de9cab19e3fc1ed48627
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafb-export: refactor of binder interface
José Bollo [Tue, 19 Sep 2017 08:14:04 +0000 (10:14 +0200)]
afb-export: refactor of binder interface

The interfaces of the binder called afb_ditf and
afb_svc are merged together to create the afb_export
structure.

Change-Id: I841ba04d7b2f94bfc19f691ec746d0bd221f164d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoverbose: Fix wrong error report
José Bollo [Thu, 14 Sep 2017 11:34:37 +0000 (13:34 +0200)]
verbose: Fix wrong error report

Change-Id: I0718204c52ccb4c28c2380c947b7db60b8785ead
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoafb-api-so-v2: improve generation of description
José Bollo [Tue, 12 Sep 2017 11:47:10 +0000 (13:47 +0200)]
afb-api-so-v2: improve generation of description

Change-Id: Ibe8fbbec59cc8db35c635346f0d441f0140eced5
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agoRemove tailing spaces and TODO file
José Bollo [Tue, 12 Sep 2017 10:18:22 +0000 (12:18 +0200)]
Remove tailing spaces and TODO file

Change-Id: Id7cdad4e24c6ab62bf9c325b542e1605b17223f4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
6 years agocorrecting license reference to align with code 51/11051/1
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>
6 years agoBump version to 4.99-EERC1
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>
6 years agoBump doc to 4.99-EERC1 55/10955/1
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>
6 years agoafb-proto-ws: Split afb-stub-ws in two 4.99.1 eel/4.99.1 eel_4.99.1
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>
6 years agoafb-xreq: Fix bugs in subcalls
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>
6 years agoafb-hreq: Fix a leak on websocket upgrade
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>
6 years agoafb-ws: optimize buffer management
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>
6 years agosig-monitor: Fix a warning (minor)
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>
6 years agoImprove isolation of bindings
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>
6 years agoUpdate the url of the project
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>
6 years agoSet Version 4.1
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>
6 years agoAllow renaming of API
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>
6 years agoafb-ditf: use NULL function feature
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>
6 years agoImprove handling of verbosity in bindings
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>
6 years agoImprove handling of verbosity
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>
6 years agoafb-ditf: track daemon state
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>
6 years agoafb-hook: change output format
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>
6 years agoafb-hook: output hooks to stderr directly
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>
6 years agoImplement afb_req_has_permission
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>
6 years agoafb-auth: improve afb_auth_check_permission
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>
6 years agoafb-auth: export method to check a single permission
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>
6 years agoafb-auth: revert order of arguments (minor)
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>
6 years agoafb-api-so: take care of SIGSEGV in dlopen
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>
6 years agosig-monitor: handle SIGSEGV in backtrace
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>
6 years agoFix segmentation fault when random token
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>
6 years agosig-monitor: Dump stack atomically
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>
6 years agoafb-apiset: Refactor and clean
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>
6 years agoAFB.js: fix bug (minor)
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>
6 years agoafb-api-ws: Fix bug introduced by 2e83db0
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>
6 years agoGive priority to option --binding
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>
6 years agoMake noconcurrency more efficient
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>
6 years agoafb-apiset: refactor access to apis
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>
6 years agoafb-trace: use constants for verbosity level
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>
6 years agoupdate monitoring into packaging 39/10739/2
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>
6 years agoverbosity: fixes split verbosity level 1 in 2 levels
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>
6 years agoafb-svc: make service existing during its initialisation
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>
6 years agojobs: optimized version of fix starve
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>
6 years agojobs: fix starve
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>
6 years agoafb-api-ws: check that the ws-server API exist
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>
6 years agomonitor-base.css: fix overflow
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>
6 years agohooking: Add hook at global scope
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>
6 years agoverbosity: split verbosity level 1 in 2 levels
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>
6 years agoverbosity: Prepare hooking of log messages
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>
6 years agomain: set name even for syslog
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>
6 years agohook+trace: add a unique timestamp
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>
6 years agohook+trace: adds hookid and type
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>
6 years agoafb-config Copies the values of option --exec
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>
6 years agoprocess-name: fix a warning
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>
6 years agoAdd option --name for naming the process
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>
6 years agoafb-config: update the output of the config
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>
6 years agoRework CMakeList.txt
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>
6 years agoMerge "Update packaging"
José Bollo [Tue, 29 Aug 2017 06:33:22 +0000 (06:33 +0000)]
Merge "Update packaging"

6 years agobuild config: remove forced AGL_DEVEL from src/CMakelists.txt
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>
6 years agomonitor: disable monitoring by default
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>
6 years agofix typo
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>
6 years agoUpdate packaging 05/10705/1
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>
6 years agomonitoring: add default page index.html
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>
6 years agoafb-config: rework on option --random-token
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>
6 years agomonitoring: Add option --monitoring
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>
6 years agoafb-config: Add short -p option for --port
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>
6 years agomonitoring: improvements
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>
6 years agosrc/afb-api-so.c: fix uninitialized variable
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>
6 years agomonitoring: add copyrights
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>
6 years agomonitoring: fix color
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>
6 years agoafb-config: copy string values
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>
6 years agoafb-config: Improve naming (cosmetic)
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>
6 years agoafb-config: Optimize boolean flags
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>
6 years agoAdd option --no-ldpaths to avoid default ldpaths
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>
6 years agoAdd option --weak-ldpaths (for weak loading path)
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>
6 years agoafb-api-so: fix a bug in error detection
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>
6 years agomonitoring: improve user interface
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>
6 years agomonitoring: updated demo with dark theme
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>
6 years agomonitor: Test page for monitoring
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>
6 years agoafb-monitor: update hooks for tracing
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>
6 years agoFix: C++ compilation warning using genskel 85/10685/2
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>
6 years agogenskel: fix bug in namings
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>
6 years agoafb-monitor: update hooks for tracing
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>
6 years agogenskel: improvements and bug fixs
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>
6 years agoafb-stub-ws: improvements
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>
6 years agoafb-apiset: add a wrapper for 'describe'
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>
6 years agoafb-websocket: update websocket protocol
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>
6 years agoafb-debug: expose wait/break features
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>
6 years agosubpath: creation for splitting locale-root
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>
6 years agoafb-xreq: handle when no reply was sent
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>
6 years agoafb-api-ws: typo
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>
6 years agoafb-evt: fix a bug discovered by clang-check
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>
6 years agoafb-session: fix an over allocation
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>