summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-01-05Merge "afb-api-v3: Fix potential buffer overflow"Stéphane Desneux1-4/+5
2019-01-04afb-api-v3: Fix potential buffer overflowJose Bollo1-4/+5
Change-Id: I170e127ebf96d2accfdd6d6a4ec322afeaa2782f Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-01-04afb-binding-v3: Fix issues in includesJosé Bollo2-5/+6
Fix 1: afb_api_v3_verbose doesn't exist Fix 2: afb_api_vverbose isn't declared Fix 3: Ensure implicit cast of "api" and "req" Using presupposed knowledge of internals of afb_api_t and afb_req_t is bad when dealing with implicit conversion in C++ and is generally not the way to go. Change-Id: I2630faa5ea0ae315ca95e4fd6ed6ae1a0beb01a5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-01-03packaging: Remove hard dependency to samplesJose Bollo2-16/+2
Fixing names and number of samples in packaging could be avoided. Change-Id: I57355e68be45e1a4fdd6d76bcd44dea57ca63813 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-01-02hello3: Add verb 'after'Jose Bollo2-2/+79
The verb 'after' launches a new thread that after a delay will call a verb (like call). The type of call can be set to 'call', 'callsync', 'subcall' or 'subcallsync'. This allows to add test for asynchronous issues in multithreaded environment. Change-Id: Ic59a27b7b7fbd3716d34fdaa35c42aa9ecb7f201 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2019-01-02bindings/samples: Cleanup and tiny commentJose Bollo5-1465/+14
The count of samples was too large and with duplications. Hopefuly, removing duplications and adding a tiny README file lowers fuzzy. Change-Id: I55ed8f40a4f1e6e28e2a36f2819e25505246ecdd Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-12-31jobs: Fix a lock of call syncJose Bollo1-24/+59
Sometime the function jobs_leave missed to wake up the process that expected the result. It happened when that waiting thread was locked in the epoll. That commit unlock it. Bug-AGL: SPEC-2089 Change-Id: I6ab6a60a8c9ea3639143f282f90c7b77ed16853a Signed-off-by: Jose Bollo <jose.bollo@iot.bzh> Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2018-12-19Remove useless %lang% prefix in yaml book fileguppy_6.99.3guppy/6.99.36.99.3Sebastien Douheret1-20/+20
Change-Id: I25c5efebc281f774324851372d2d074e31988847 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-12-14wrap-json: Upgrade to latest versionJosé Bollo1-18/+19
Change-Id: I3eb4e922cb5106bcf8a1ccc5e1b010bd0a60bf34 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-12-13afb-hsrv: Prepare selection of listening interfacesJose Bollo4-14/+139
The listening socket will no more be the default one but will be the selected ones, with ability to select more than just one listening interface. Nevertheless, the behavior is not changed at the moment. The default interface (0.0.0.0) is still used. A further change will add the ability to select the listening interfaces. That evolution depends on a fix of libmicrohttpd to enable at the same time epoll and no-listen-fd. Bug-AGL: SPEC-1833 Bug-AGL: SPEC-1016 Change-Id: Ia78671cbee90a243ba7b2c724b6155cffbde6920 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-12-13afb-trace: Make real timestampsJosé Bollo1-10/+0
The optimisation that represent the timestamp as a fake double is not accurate in local context. Bug-AGL: SPEC-2051 Change-Id: I285837251507a69ad210823020d0cf69ad5999f3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-12-13docs: add yaml bookClément Bénier1-0/+55
SPEC-1988 Change-Id: Ida94e5cf39b8c23efca9620d62ec2db55746d2b3 Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2018-12-05afb-proto-ws: Add error reportJose Bollo3-1/+15
Change-Id: I58c88f8bcaf4cfb8a53b58eeefd7fa3415bf894a Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-12-05afb-hook: Improve reentrancy of hookingJosé Bollo1-126/+163
Work on testing showed that a deadlock was occuring in management of hooks. Change-Id: Ib51eb4f0b9ffc5d9dfe2770f2c3f8f47f262b60f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-11-28Fix deprecation warnings for older GCC versionsguppy_6.99.2guppy/6.99.26.99.2Johann CAHIER1-2/+2
For some reason, SDK doesn't display warning when AFB_BINDING_VERSION is defined as 2. Using #warning instead of #pragma GCC warning fixes the display. Change-Id: I3c96b3630e0d1eac63b2fde72bdec3c7f3d1714a Signed-off-by: Johann CAHIER <johann.cahier@iot.bzh>
2018-11-22globset: Introduce globset for event handlingguppy_6.99.1guppy/6.99.16.99.1Jose Bollo9-87/+693
It optimises the event handling that was slow. It also fix few bugs: - at most one event handler is called now - the handler call has the most specific pattern Change-Id: Ic13a0258b5743579ab15e0e953ec62206d982850 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-11-20AFB.js: Tiny improvement and space fixJosé Bollo1-4/+4
Change-Id: I170abe0dd1a1de3d2cc2ea7f86c746eb93e63eae Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-11-16afb-socket: Fix address reuseJosé Bollo1-7/+7
Change-Id: I3ae51611b92762a4f09b1f6cca6ff27853cd9f95 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-11-16afb-export: Fix error in event handlingJosé Bollo1-1/+1
Change-Id: I2869a2a840fb07550d493ddc2d651358892d33d1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-11-08main-afb-daemon: Export variables to connect to binderJosé Bollo1-12/+42
Two new variables are exported that will allow to connect to the binder: - AFB_PORT: the HTTP port that the binder listen - AFB_TOKEN: the initial token that the binder expects These variables are defined only if the HTTP server is started. They are available during initialisation of bindings, even if it is before the real start of the HTTP server. Change-Id: I1b7c8572e3d77b7036a32af47b2a2f1d95803a41 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-11-02Merge "afb-socket: Relax requirement of tcp ending slash"Jan-Simon Moeller1-1/+1
2018-11-02Merge "afb-socket: Handle listening on all interfaces"Jan-Simon Moeller1-0/+5
2018-10-30afb-socket: Relax requirement of tcp ending slashJosé Bollo1-1/+1
The uri for tcp was requiring a slash (/) after the port. This change allows to not provide that slash. This is usefull for future implementation of HTTP server selection. Change-Id: I0a76d167065258d242845579b7c8728eefcc359f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-30samples: Fix compiling errorJose Bollo1-1/+1
Latest versions of libraries used doesn't define TRUE. This fix it by using 1 instead. Change-Id: I17db5ca34aeceab96c83143f49094fbaca74a95a Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-10-30afb-socket: Handle listening on all interfacesJose Bollo1-0/+5
Change-Id: I909493166f98f152e5aeb02a72f40bc3c58b42b2 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-10-26afb-hsrv: Adapt to next version of libmicrohttpdJosé Bollo1-1/+4
Change-Id: I5bef17178e972e73b653ddbff5a8b09cfc2287eb Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-23Added an option to color out the ouputLoïc Collignon5-7/+68
Enhance the readability using basic colorization to the logging system. As the '--call' option is almost unused, it doesn't require to have a shortname. So we use the '-c' and '--color' for the new colorization option, and keep only the longname for the 'call' option. Change-Id: I095fc9f38133fb742e0f0003540cd120feec8f5e Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2018-10-22afb-session: Add language to sessionJose Bollo2-0/+38
Bug-AGL: SPEC-1827 Change-Id: Icfb9e2ee76186ac677ff2fbb37be28cd83dd3b6b Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-10-22monitoring: Fix naming of apisJose Bollo2-8/+8
The introduction of API v3 changed the API of monitoring/tracing. This introduced a regression of the monitoring: it wass not more possible to filter api by name. This fix that issue. Bug-AGL: SPEC-1828 Change-Id: Ic7f614f6c696119c7fd313e3cd252095f578c64c Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-10-19Merge "Make profile.d file consistent between rpm and debian"Jan-Simon Moeller2-8/+8
2018-10-16afb-apiset: Reorder priority of messagesJose Bollo1-2/+2
The message before starting has now a greater priority than the one stating that start completed. Expecting that in case of problem it wil be cleaner. Change-Id: I2c27eb70f218d0492291c3eab4f8396ab5a6c093 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-10-15Make profile.d file consistent between rpm and debianSebastien Douheret2-8/+8
The file /etc/profile.d/AGL-app-framework-binder.sh must have the same name for all distro / packages, all the more that a reference of this file is given in the online documentation: http://docs.automotivelinux.org/docs/devguides/en/dev/ reference/host-configuration/docs/2_AGL_Application_Framework.html Change-Id: If3bd2d87bdce7af2f625eeb9a7b230f11520b9e9 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-10-12AFB.html: Allow to call any verb of any APIJosé Bollo1-7/+17
Change-Id: I3bfff2632d5854d5885740e55f0ec38fe3214424 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-12afb-hsrv: Lower the "no handler" messageJosé Bollo1-1/+1
Bored to see WARNING: Unhandled request to favicon.ico Change-Id: I7289b508f93bcd5ac4650ec32670ed0fd291044e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-12APIv3: Allow to write application bindingJosé Bollo3-3/+38
This enable a binding version 3 to declare no API. This is used to start a job that will will run after initialisation. The tutorial tuto-app1 shows how. Run it with: afb-daemon --binding tuto-app1.so A further option could be add to close stdin even if running in foreground, as it was the case before. Change-Id: I2b384d125accb4642eed8e004642ba959326878f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-12afb-api-so-v3: Keep root API in all casesJosé Bollo1-1/+8
For bindings v3, it is possible to have no explicit default root API. In that case, the binder creates a fake API that references the binding itself. That api isn't callable be it allows to emit messages, to catch events and to call services (other apis). It must be kept to ensure that there is no further error in the hypothetical case where it is used. Bug-AGL: SPEC-1812 Change-Id: I1a6c1e1390411a45521b9a6c1c386dc7807191df Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-10genskel: Fix issues for C++ bindings v3José Bollo1-13/+64
The C++ compiler is too much strict. It doesn't accept valid C because fields are in the wrong order or missing. - afb_verb_t generated structure invert vcbdata and session - missing provide_class, require_class, require_api in the afb_binding_v3 generated struct The signature of the declared function was wrong. - wrong verb's callback signature void fun(afb_req) instead of void fun(afb_req_t) This add the declaration of the (pre)initialization and onevent functions. - missing init function signation generation, or probably preinit and onevent (not tested those ones) Bug-AGL: SPEC-1806 Change-Id: I1abf8a29f831ecc80458edcd3bd094b2108dc227 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-04packaging/deb: install all headersJosé Bollo2-4/+2
The previous filter wasn't installing the files afb/afb-binding and afb/afb-binding.hpp The packaging/rpm is modified to do the same Change-Id: I77e31d618b9a2c6f8f8dd3f02a4219c4c8c1604f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-10-04Fix native deb pkg install dependencyRonan Le Martret2-2/+1
agl-app-framework-binder-bin failed to install on Ubuntu 18.04. (libmicrohttpd is named libmicrohttpd12) Remove hard coded libmicrohttpd dependency solve the issue. Change-Id: Ic1e760c422a9ea1d294d1bec614aa7b134c5b042 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2018-09-24afb-export: Emit a warning on bad 'afb_require_api' callguppy_6.90.0guppy/6.90.06.90.0José Bollo1-0/+5
The call to 'afb_require_api' in a preinit was forbiden before binding v3 refactoring. Since v3 it is made possible by deferring the requirement to the initialisation step. But this may lead to bad behaviour if someone use the call to test whether an api exists or not. This commit introduce a message that could warn a developper raising that issue. Change-Id: Icc14c3887d70f73d87da0e664bb0e5e961867b4a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-09-24afb-socket: API name cares of abstract UDSJose Bollo1-1/+3
Change-Id: Ie485672d8f66ff32ea20cb0eb313690ba380db4a Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-09-14afb-session: Fix an issue in managing sessionsJosé Bollo1-2/+2
Probably an old copy/paste error in the commit d45426257d5149c735e33e3055220625a919e7bc It doesn't affect version EE (Electric Eel). Bug-AGL: SPEC-1735 Change-Id: Ia1536e141ac12275000196a3218eb62d77b36a06 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-09-13CMakeLists: Use AGLVERSION if setJosé Bollo1-1/+2
And default the version to the next version of AGL pre-guppy: 6.90.0 Change-Id: I5955add9307dd2d07a071383950839f1137e7705 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-09-07afb-apiset: fixed the error message upon api open.flounder_5.99.6flounder/5.99.65.99.6Thierry Bultel1-2/+2
just a typo Change-Id: I2963c2568cffdc89f577e99f2280da6dcb732b04 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-09-06afb-session: Use ad-hoc pseudo-random uuidJose Bollo1-0/+50
The use of the generator given by the lib uuid implies the use of the system call 'getrandom' without the flag GRND_NONBLOCK. It has a weird effect on boot because many binders require the generation of uuid at the same time but getrandom is subject to starving. This introduced a tiny pseudo-random generation of UUID that does not implies the use of 'getrandom'. Bug-AGL: SPEC-1655 Change-Id: I5131072881d7a53f0edda9e36762985c96a04550 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-09-06VERSION 5.99.FFRC6Jose Bollo2-2/+2
Also add newline at end of .gitreview Change-Id: I826ecaf695a40dd883a690125fe8e2bffce1cd87 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-09-06Merge "main-afb-daemon: Export API after initialization"José Bollo3-5/+9
2018-09-05main-afb-daemon: Export API after initializationJose Bollo3-5/+9
Exporting API after initialization is a simple technic to avoid interleaving of incoming foreign calls during initialisation. Also a tiny fix in jobs.c and afb-socket.c. Bug-AGL: SPEC-1724 Change-Id: I59596256481c8afcd88755ec303bf7f881b55c12 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-08-31app-framework-binder doc: Changed doc to fit new format.flounder_5.99.5flounder/5.99.55.99.5CorentinLGS13-962/+23
-Split book.json in 2. -Deleted unwanted files. -Changed all links to .html files to .md files in the SUMMARY.md, it is used by gitbook to build the pdf and as gitbook doesn't handle .html files I had to change it. Change-Id: I15705ef0f0d9143971c046ccb72a4eee04b98890 Signed-off-by: CorentinLGS <corentinlgs@gmail.com>
2018-08-28Allow choice to trap or not program faultsJosé Bollo5-29/+110
The binder traps faults by default to recover as much as possible from unexpected errors. Developers may need to remove that behaviour to get core file. This introduces 2 ways to set or remove the trapping of faults: - the environment variable AFB_TRAP_FAULTS - the command line option --trap-faults Both take a boolean value set using on of the following words: 1 yes true on -- enable trapping of faults (the default) 0 no false off -- disable trapping of faults Bug-AGL: SPEC-1702 Change-Id: I6c6a3b933dbda9922a6079c390a601c533d49e55 Signed-off-by: José Bollo <jose.bollo@iot.bzh>