summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-07-13afb-wsj1: Fix json parsing of unterminatedJosé Bollo1-0/+2
When receiving 'false', 'true' or 1, the tokener isn't able to terminate its job without ambiguity. Catch this case to force a terminating character. Change-Id: I5c78f759852060ccf0fac87b3f6fc33a65bf30c9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-13afb-api-v3: Fix wrong error messageJosé Bollo1-2/+3
Change-Id: Idc2d85ccf71fb7c88a3bbcf981c316b5ba70f434 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-13afb-apiset: Try to initialize all APIsJosé Bollo1-3/+4
Don't stop on the first error when initializing apis. Record the error and return it at the end. Change-Id: I1f0f50ff4e527ca5bf0e78904fccddafe54ba5f2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-13afb-export: Monitor calls to API initialisationJosé Bollo1-19/+49
Catching SEGV or other exceptional execution error is better for the whole process. Change-Id: I0ece72abe5e0a7ebd7d29aafa416462e6e5963af Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-13afb-api-so-v2: Monitor the preinit to catch SEGVJosé Bollo1-1/+24
Add monitoring of preinitialisation of bindings v2 in the hope to better handle arbitrary code execution. Change-Id: I86354caedb17ef9d4904c1f4f47b1ea3c6dd4c40 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-13main-afb-daemon: Kill child instead of itJosé Bollo1-1/+1
Killing afb-daemon when exit is called has bad side effects. Because there is no need to do it now, remove it. Change-Id: I18903bb168b1722a522cb4a78c5c8c2508483996 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-13afb-config: Fix wrong error message and more infoJosé Bollo1-3/+21
The wrong value of the log option wasn't displayed. The output of --version now prints more compile options. Change-Id: I09b8b66279a10cd4b2b6d460b3dbaeb370b3dadd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-13afb-supervision: Remove dependency to externalJosé Bollo8-14/+23
Also some cleaning in use of extern to allow accurate grep. Removing extern is better for linking and for structuration. Change-Id: I8121c4b9b34fa2737bffd2ecbe170d04d1d60ad1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-12Packaging: Fix RPM buildRomain Forlot1-0/+1
RPM build failed because there is an unpackaged files found which has been installed. This fix the build error: Installed (but unpackaged) file(s) found: /opt/AGL/lib64/afb/hello2.so Change-Id: Id5775966bbc4cac00d6adc8b9032d32cf41a7207 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-09main-afb-daemon: Remove call to "nice"José Bollo1-3/+0
Instead of setting the priority in the binder, delegate that responsibility of setting the priority of the process to the launcher. Bug-AGL: SPEC-1578 Change-Id: Ia6bdbdda72ce76fabc19c6448deeb62e2861dce0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-09docs: Fix internal links by referencing html filesJosé Bollo6-58/+58
What to reference? Markdown files or HTML files? I dont like this solution but it is the least effort. Bug-AGL: SPEC-1544 Change-Id: I0d2e2c7fe1cfe769149bee3af611b04d2fe1aead Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-08coverage: Improve testingJose Bollo6-3/+68
- Add test of bindings v2 - Distinguish between clean and cleanall - More valgrind ouput Change-Id: If929756d9d35ddb959b46f7330cbf318301d532e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-08hello2: Add a binding v2 exampleJosé Bollo2-0/+553
Needed for test of bindings v2. Change-Id: I33f8b497428bf03f8f80ad26bcdec773d269f41d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-08hello3: Fix a bugJosé Bollo1-1/+0
The request was released without any need. It came from migration from v2 to v3. Change-Id: If2558ca247f0db912ce5705fa1fd98f3771dcb1f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-08afb-api-v3: Fix a bug introduced by 8ca7b69Jose Bollo1-3/+3
This bug returned a wrong OpenAPI description and produced a memory leaak. It it could be good to rewrite this part using wrap_json_pack. Change-Id: Ie0cf03e4434f8674273e9fac3c49a0f9c8196eac Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-08afb-cred: Fix memory leakJose Bollo1-3/+5
Change-Id: I1badca46d9e829c9b9443fce0a1e7d6a5ffad595 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-08coverage: Add valgrind diagnosticsJose Bollo1-0/+5
Change-Id: I047f6a1946ba523776abf9f252a3938e945c8028 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-06Update version to 5.99.FFRC2José Bollo1-1/+1
Change-Id: I42bdaff39ac5f91c21bee4e4f9ff089ee3040a5b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-06Simplify build by introducing queuing functionJosé Bollo6-190/+48
It is not valuable at the end to continue to have this fake job implementation. So removing it is good. Change-Id: I930ade3e3a511f0ebfb91292e5725ac3be884d44 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-05Remove uses of deprecated macrosJosé Bollo5-7/+0
Change-Id: I439e891d92fb34087755e68102fda97c43b5b786 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-05supervision: Exclude conditionaly the supervisionJosé Bollo4-3/+14
Exclude from the binder the part related to the supervision when the supervisor is excluded from the build. Change-Id: I41193122d63e47b9f0db7f113f88d2d63b783027 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-05Simplify build processJosé Bollo4-2/+13
Allows to compile all files even if it isn't required to simplify the build process. Change-Id: Ie09e99794aa9f57b179c7e4cfa882859958beb7a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-05locale-root: fixed uninitialized variableThierry Bultel1-1/+1
This has become an error since a gcc update Change-Id: Ib49bd8c46091efdfe9483bb29a023a4e97c8db2f Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-07-04afb-trace: Fix bug in tracing of afb_req_get_client_infoJosé Bollo2-5/+2
The utility wrap-json distinguishes o from O, the latest increment the reference count, as expected. Bug-AGL: SPEC-1563 Change-Id: I4490ac894059e47abf1e2474aab07249b862e985 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-04afb-client-demo: Fix bug that forbids interactive behaviourJosé Bollo1-0/+2
Latest change that added script compatibility (see 1f9e60c) introduced a regression that made afb-client-demo not useable interactively. Bug-AGL: SPEC-1562 Change-Id: I1e0ca5caa23ee9838ba8691f384db3d0b13bd488 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-04afb-req: Fix a bug in afb_req_verboseJosé Bollo2-2/+2
The newer version of afb_req_verbose was self recursive leading the crashes. Bug-AGL: SPEC-1561 Change-Id: I40959e5b72ca850712c27a505e77efea43aadabd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-07-03saha -> salam: To continue using helloJose Bollo4-4/+9
My memory has hole and thought that saha was hello in arabian but it is thank you. To avoid misplaced suceptibility, i also adde shalom. Change-Id: I493d91fe79c9ce1a2b1a0318883e2cb26a43eb87 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-03doc: Tiny improvementJose Bollo3-3/+3
Change-Id: I3e8b0cbbe925d9536722962ed1ddc8a63cdbc08a Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-03Improve readdirs to follow symbolic linksJose Bollo2-7/+14
The use of symbolic links can be helpful in some cases. That modification takes care of allowing symbolic links in the exploration of directories. Change-Id: I54d9004187ba5942410aca37b890cd4f6925177d Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-03coverage: Add the missing filesJosé Bollo12-1/+120
The files weren't included due to git and gitignore. Also add a README.md to reproduce the test. Change-Id: Ifcdffaca32c369b2ff5fb82e246fa0cad87813f5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22coverage: Add coverage testflounder_5.99.1flounder/5.99.15.99.1José Bollo22-0/+215
This is a first version of the coverage tests. Change-Id: Iec2feaba12c369b2ff5fb82e246fa0cad87813f5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22main-afb-client-demo: Allow scriptingJosé Bollo1-15/+61
This version allows to pipe from a script shell. Change-Id: Ia2bb3e059b8a5a1b097178d2883ef385e7efcdca Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22afb-autoset: Automatic prefix with unix:José Bollo1-1/+5
Change-Id: I325d768b3bdfcb313b57e1752cbc156b3735b55a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22afb-api-v3: Refactor verb descriptionJosé Bollo1-17/+34
Change-Id: Iaa1719ee2891d470f8229c6f1b98dd34265593a6 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22afb-api-so: accept symbolic links for bindingsJosé Bollo1-3/+3
Change-Id: I1ef90b0f889767d04f84c8c7eb27d19c04390b15 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22hello3: Add verbsJosé Bollo1-0/+37
Add the following verb for testing purpose: - close: close the session - set-loa: set the LOA of the session - setctx: set the contextual data of a session - setctxif: set the contextual data of a session if not already set - getctx: get the contextual data of a session - info: returns the info of the session Change-Id: Ie2ceb897ecdff01f6efd0a3b174b5794913726d9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22api-v3: Add monitoring of faults in preinit functionsJosé Bollo3-2/+35
Change-Id: I0abea1aa62d86372f07f61b7c5dc2e854137f99a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22afb-client-demo: Add option to keep runningJosé Bollo1-4/+12
This option allows to keep the client running even when its input is closed. This will be used for tests and for reporting because it allows to write: echo 'monitor trace {"add":{"api":"*","request":"*","event":"*","session":"*","global":"*"}}' | afb-client -k $WSURL > logfile to capture all events. Change-Id: If1c7804556190fd8ec9388260fe014c50b498b1d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-22Improve documentation of api v3José Bollo52-1398/+4275
The documentation is improved to reflect the new version. Tune the options Change-Id: I894c3db3bc0c10e89db66a9a51a9ad049bb8c0c4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-20packaging: Add V3 demo filesRonan Le Martret1-0/+2
Change-Id: Ia9b047bf01543f7cc1c794d91bf479d9848509d3 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2018-06-20packaging: Update spec and deb packagingRonan Le Martret8-19/+35
- sort files by packaging type Change-Id: Ic914b5eedffce04356bb59db36be30ba81a8a20d Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2018-06-19Fix a warning in using readlinkJosé Bollo2-17/+26
The use of the same buffer as input and output of readlink leads to warnings due to restrict use in new versions of GLIBC Change-Id: Ifbf1277b88bd18a9df1e18211d4248e94c16d6da Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-19Fix warnings due to json-c evolutionJosé Bollo6-13/+13
The library json-c now returns size_t instead of int when querying length of arrays. Change-Id: Id52bb8e77da12cb01e61e1a7c7f4ae2fcbe4634e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-18afb-hsrv: Add processing of type application/jsonjobol3-4/+26
Makes the data posted as application/json directly available through json. The previous processing made content transmitted with the content-type application/json available as a string in the field of name "" of the returned json object. Change-Id: I11615b9b147ee4daa1b1358c2bd36fd839d8a7a9 Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-06-15api-v3: First draftJosé Bollo155-6811/+19209
This commit introduces the bindings v3 API for bindings. The documentation has still to be improved and will come very soon. Change-Id: I8f9007370e29f671fdfd1da87fff7372a17db7af Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-13jobs: Switch back to sd_eventjobol2-3/+47
Change-Id: I8c9de83d857844b1c5d0d2d26385dbf19fcae228 Signed-off-by: jobol <jose.bollo@iot.bzh>
2018-06-13afb-trace: Restore microsecond timeJosé Bollo1-1/+1
This allow to use accurately float 64 bits for times from 1970 to 2112. Change-Id: I8f57a57edbf5469f827c0eeb80191de934d9841e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-13gitignore: Ignore netbean files from nbproject/José Bollo3-1080/+1
Change-Id: Ic89f9dde8111a20e8dfc5f536ec0e731b2b49df7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-06-13Fixed spellingSebastien Douheret10-36/+36
Change-Id: Id7c183face3179a3b9cec7ed128e3a2561d9f3ad Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-06-13afb-client-demo: real raw output when --raw is setSebastien Douheret1-7/+7
Having a 'real' raw output allows to pipe output with useful tools like jq. For example: afb-client-demo 'localhost:5555/api?token=HELLO&uuid=c' hello ping | \ jq .request.status Change-Id: Ib871a257375bec26f315cdcdbb590033b645ac9d Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>