José Bollo [Mon, 23 Oct 2017 12:11:32 +0000 (14:11 +0200)]
websocket: cleanup
Change-Id: I772e441f1b93131df670ef3fbef3a37e2a2c00f1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 23 Oct 2017 12:11:04 +0000 (14:11 +0200)]
websocket: Tune maximum received length
This commit increase the count of data that
is accepted by default from 65,000 to 1,048,500.
It also offers new functions to tune that value.
Change-Id: Iecf0b8c308e8287582819a8769859c39e46919c2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 16 Oct 2017 19:24:07 +0000 (21:24 +0200)]
afb-api-dyn: Uniform return 0 on success
Change-Id: I6ca079fa84547928f999e07d1925202a1e14850f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 16 Oct 2017 14:53:26 +0000 (16:53 +0200)]
afb-api-so: improve error messages
Change-Id: I3bbf11890800a8b05c9cfaa8bd10b50a0b22c245
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 12 Oct 2017 20:59:09 +0000 (22:59 +0200)]
afb-stub-ws: Always validate clients of stub-ws
Change-Id: I2c020d586e6f22e47dac8ddb50c8ee9ca9c46b2e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 11 Oct 2017 11:12:57 +0000 (13:12 +0200)]
libafbwsc: add function 'afb_ws_client_connect_api'
This function allows to connect to an API exported by the
binder.
The demo program afb-client-demo is modified to integrate
on option that direct API connection.
Example:
server: afb-daemon --ws-server unix:hello
client: afb-client-demo -d -H unix:hello
Change-Id: Id9f857a453c406df1c4b36eb25fb5e833a938c3d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 11 Oct 2017 11:11:06 +0000 (13:11 +0200)]
afb-proto-ws: remove dependencies
Remove dependencies to verbose and to afb-common.
Change-Id: I140f2cd7c159e9be994ab7b786a164d605d1b1dc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 11 Oct 2017 08:26:07 +0000 (10:26 +0200)]
Update documentation for afb_req_get_uid
Change-Id: I984824b8ffc22783c1e6b63ee03ba23d5b7e2954
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 11 Oct 2017 08:13:32 +0000 (10:13 +0200)]
Update C++ interface for afb_req_get_uid
Change-Id: I8c281417bd08b49ac708a7992cb46a074e74c979
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 10 Oct 2017 16:21:54 +0000 (18:21 +0200)]
Add the function afb_req_get_uid
Change-Id: I9caf38ee3811cf10b546489094f0bb5b3d844c40
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Tue, 10 Oct 2017 16:21:23 +0000 (18:21 +0200)]
Remove explicit Debug build type
Change-Id: Ib9a793035b36ddf6f4c7cff2b814ba37bf662861
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Mon, 9 Oct 2017 10:43:29 +0000 (12:43 +0200)]
afb-api-dbus: Make error for subcalls if DBUS transport
The DBUS API actually doesn't support the subcall feature.
Until the subcall is implemented, it is better to emit an error
than to fall back to the default behaviour (calling in the context
of the service).
Change-Id: Ibf5f3524995692a509d2d648d61e9ed0f874d7c1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 16:35:13 +0000 (18:35 +0200)]
Add wrappers for accesses to internals
Change-Id: I6144b0ab21418dc98792f0eeef695f3df0fc11d3
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 15:13:14 +0000 (17:13 +0200)]
cosmetic
Change-Id: I628829b3a360897434a32b2fd0992f697f954f4d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 15:07:51 +0000 (17:07 +0200)]
Add function afb_evt_eventid_addref
Change-Id: I737f3ceaa41b5ec9a200a615dbc29965ed11c17c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 15:04:22 +0000 (17:04 +0200)]
Improve naming of evt_eventids
Change-Id: I1fa3cf776110f67ad1b18c4c83f3a1707692ae8b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 14:31:15 +0000 (16:31 +0200)]
Cleanup of header files
Change-Id: Icf6cffdf303e125feec2661f5ce736a398c07932
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 14:24:24 +0000 (16:24 +0200)]
Provide API and VERB name of requests
Change-Id: I9a86c6314f871334231e50f9cea60b54aed434b9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 14:09:10 +0000 (16:09 +0200)]
Provide the name of the API
Change-Id: I5b4e4b40385830d1b8921d079f5e7e732ec4247f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 13:59:48 +0000 (15:59 +0200)]
Add a closure argument to dynamic verbs
Also demonstrate the mix of api v2 with dynapi.
Change-Id: I95e8d32ac836590ce3f7b3f0b5f29e5574808976
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 13:22:54 +0000 (15:22 +0200)]
Allow pure dynamic bindings
Activates the new internal interfaces
Change-Id: I8f51cd271f66a0216ffdf03626300bb5964a70f9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 13:17:31 +0000 (15:17 +0200)]
Allow dynamic creation of APIs
Change-Id: I825bfa7969c98dd214457d9ff94e2948362286a9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 12:42:14 +0000 (14:42 +0200)]
Make single afb_request_subcall
Change-Id: I8cc96ef9c05781069f07b807bc6632d13668ac69
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 08:53:18 +0000 (10:53 +0200)]
afb-export: prepare to eventid
Change-Id: I87c09c2edb198598b3d303ceff07fcd6ec6a40f1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 08:51:59 +0000 (10:51 +0200)]
afb-export: cleanup of unused async
Change-Id: I69e02e32444fe460219d849b26beb3db36ab5467
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 08:16:03 +0000 (10:16 +0200)]
sig-monitor: Fix backtrace cropping
Change-Id: Ia2e5fbbe62c7145c5934494d2cf04d04526cecef
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 07:37:54 +0000 (09:37 +0200)]
Provide conversions for afb_event and afb_req
Provision is made here to convert, trivially:
afb_event -> afb_eventid*
afb_req -> afb_request*
The opposite conversions aren't provided to
favor new interfaces.
Change-Id: Ib67c2317f782e2edfd1ba0e49e10b321a3b770a3
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 07:28:25 +0000 (09:28 +0200)]
Remove unused files
Change-Id: I922d69d8d2834a4aeebf06a925455ea7c28a1642
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 05:58:05 +0000 (07:58 +0200)]
Prepare subscription to eventid
Change-Id: Ie3f75377009be36f7f5bd52bdb31d0611cd49778
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Fri, 22 Sep 2017 05:39:49 +0000 (07:39 +0200)]
Make addref for request return the pointer
Change-Id: I4286cbd9d02b406570185d265e7b925c43bbc42c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 21 Sep 2017 19:25:07 +0000 (21:25 +0200)]
Deprecate internal use of afb_event
The deprecation is made in favor of
afb_eventid but this can change later
in favor of afb_evt_evtid.
Change-Id: Ic16cb25dbd97cb1e8d26b3c54b159d46bbf82671
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 21 Sep 2017 16:17:39 +0000 (18:17 +0200)]
afb-export: record apiset at creation
Change-Id: I058eaee990e34990d0860a316ba8c348c23eff5f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 21 Sep 2017 15:02:36 +0000 (17:02 +0200)]
afb-auth: Move json serialisation of afb_auth
Change-Id: Ifa50d1b7aa8d900cd6786f6950e0a738301d6c92
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 21 Sep 2017 13:17:11 +0000 (15:17 +0200)]
Introduce afb_request
This prepares the new api with pointers.
Change-Id: I4eb299551145226e428934b6835a1a7810ae6439
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 21 Sep 2017 11:11:02 +0000 (13:11 +0200)]
Introduce afb_eventid
This new name is better suited because it is not an event
but the id of an event.
This also prepares the new api with pointers.
Change-Id: I7be88bb36cf72bf7df70793a77452e405130b951
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 21 Sep 2017 10:34:12 +0000 (12:34 +0200)]
Make afb_event_drop obsolete
The function is now replaced by the function afb_event_unref.
In the same time, the function afb_event_addref is made available.
Change-Id: I9aa30e80e64e82f3b16ab359982337771b287185
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 21 Sep 2017 09:52:50 +0000 (11:52 +0200)]
afb-trace: Use the fresh afb_eventid internals
Change-Id: Ia9c840fb768bc058e74c32028b8a4817463177e4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 21 Sep 2017 09:26:07 +0000 (11:26 +0200)]
afb-evt: prepare futur afb_eventid
Change-Id: Ie4668c2dadbdfbe79bac2c27a1b188edecbcf847
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Thu, 21 Sep 2017 05:57:24 +0000 (07:57 +0200)]
afb-api: Define the notion of group for concurrency
Change-Id: Iafbbff8387bb1f8577cb7aeb6e8ed4b14ab1f4a4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 20 Sep 2017 15:24:14 +0000 (17:24 +0200)]
Refactor of starting apis
Change-Id: Ib2efcd8747c3537714dfa7058bb0623d6e283c3d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 20 Sep 2017 13:34:11 +0000 (15:34 +0200)]
Atomic context initialisation for bindings
Change-Id: I3e81b64d57c917da1fba9b3a9387d0f4d7f3e6b7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 20 Sep 2017 12:07:35 +0000 (14:07 +0200)]
afb-session: Fig tiny bug
Change-Id: I74efb96d3140edbf634210189a12399123c0a297
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 20 Sep 2017 11:34:02 +0000 (13:34 +0200)]
minor cleanup
Change-Id: I32d44b1150814d8f80d5db44a5730c87606c054b
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 20 Sep 2017 11:30:19 +0000 (13:30 +0200)]
afb-export: getter for the apiset
Change-Id: I6cb5bb0f19a6427bcc6532152863b67bc70dced4
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 20 Sep 2017 10:19:24 +0000 (12:19 +0200)]
afb-xreq: hide internal addref/unref to xreqs
Change-Id: Ie175ec1e508c7bd3bcdc25d7e0b26e7a9da3fafb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
José Bollo [Wed, 20 Sep 2017 09:12:36 +0000 (11:12 +0200)]
afb-xreq: prepare futur afb_request
Change-Id: I0986113475f354bccdbc711e74a63c9ca809c5ed
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>