aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-02-15afb-context: Early token changeJosé Bollo1-0/+4
Change-Id: If27d84a702513b92f08c97ef91bf8cf89b5af238 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-15afb-config: Fully exclude config monitoringJosé Bollo1-0/+4
Change-Id: I93b3d49f46d4dec607b08cc439b6cb06cf68ec32 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-15afb-config: Increase the default timeout of sessionsJosé Bollo1-2/+2
The management of sessions is not very well understood actually. People are using it without refreshing the token. This has the effect that the binder closes sessions after one hour. So no demo can run more than one hour! Increasing the timeout to more than one year will solve the demo problem but will not fully solve the overall problem. Bug-AGL: SPEC-1296 Bug-AGL: SPEC-1293 Change-Id: Icb9adb4939a138c19be36280bf1e6643d04489ae Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-15afb-session: Use clock insensitive to time changesJosé Bollo1-1/+9
Bug-AGL: SPEC-1296 Bug-AGL: SPEC-1293 Change-Id: I1838175b48dff8fbf1fd65bd304f9cfe917ced80 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-14afs-supervisor: Add verb for running discoveryJosé Bollo1-3/+20
Change-Id: Iea9e54fa7a1c93ba3927c836d6ca5bcded77ca66 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-14afs-supervisor: Add discovery mechanicJosé Bollo4-13/+125
Change-Id: Icfcdcc16d0433454c9bb0785d0690f7f173980ae Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13afs-supervisor: Improve name of supervisor apiJosé Bollo3-7/+8
Change-Id: Id0b43cecb91fa0a405c07f63d4f8c2f026c8a70c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13supervision: Add retrieval of configJosé Bollo3-56/+75
Change-Id: Id7bb91c267037cbd36c6cafef62d3c39a67e77db Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13afb-config: export config to jsonJosé Bollo2-2/+95
Change-Id: I8918733753ec791e77eb8a71032ccdb35fa68d71 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13supervision: Add supervision and supervisorJosé Bollo6-0/+984
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13afb-stub-ws: Fix segfault on diconectionJosé Bollo1-1/+2
Change-Id: I7826b86e4d4cc921b2daaca5c8dda0fd27faae10 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13afb-stub-ws: Protect against self-destructionJosé Bollo1-0/+2
Change-Id: I43b15b8f675173a693816a0b8efd05fd024278f0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13afb-trace: Add tracing of sessionsJosé Bollo3-132/+255
Change-Id: Ieba4032bed526ca158dc69558177a038df95988b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13afb-session: Add function to enumerate sessionsJosé Bollo2-0/+23
Change-Id: Ifaa1aa02d0562c40763ac03b7c05df7f9f9c8127 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13test-session: Add check of hookingJosé Bollo2-18/+142
Change-Id: I3ac86b41537651e360e7ea21ad425f2e1bffb852 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-13afb-session: Insert call to hookingJosé Bollo1-7/+20
Change-Id: I7d91b133761c7c751300bf1344321e295cce1bc3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-09afb-hook: Add hooks for sessionJosé Bollo2-4/+228
Change-Id: I4fbd6bf57958abb366a742b12afb92bfc03ad299
2018-02-09afb-session: Refactor and test unitJosé Bollo6-242/+549
The session are refactored and now to include a test unit. Change-Id: Ia8c4b707191f3af95c0549b333d14b384a81eaa7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-09afb-stub-ws: Fix a session leak bugJosé Bollo1-1/+1
Change-Id: I55b72d7a4e7ca18e61addb3b0efa2ec75729060b Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-09afb-config: Improve doc of option --tokenJosé Bollo1-1/+1
Change-Id: I196c7f2b216e031f52b208e19c6c2df8593d27c5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-09main: Isolate HTTP initializationJosé Bollo1-10/+10
Initializations linked to HTTP are deferred until starting the HTTP server. Change-Id: I917c4c5db3c3ae894ee60fd16b9e09d4185fcdb4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-09afb-session: Return an initialization statusJosé Bollo3-5/+18
Avoid exiting anywhere Change-Id: Ic24a2c7435645632d609fb16849d33b204062397 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-09afb-session: Fix a typoJosé Bollo1-5/+5
Change-Id: Ia834cfd203ab1471efa21ce650fcd7895370dc63 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-06jobs: Add argument to startJosé Bollo3-5/+10
Change-Id: I89a75a036c60097fb898ab8723007ca6ebfc7f39 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-06afb-xreq: Export afb_request facilitiesJosé Bollo2-73/+73
Internally, the binder can need to convert afb_request to xreq and conversely. Exporting this facilities is good. Change-Id: I5bb01d701eee0ac30ad6ce490609f6124a9d5860 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-06afb-trace: Replace daemon by api nameJosé Bollo3-11/+11
This replacement greatly improves the code. Change-Id: If3fd6e6080eda2268ccf551998f99af01799be29 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-31afb-evt: Add event creation with prefixJosé Bollo3-11/+32
Change-Id: I2fd35e8ed59c28f4283be698a2586cdae5f7c8cf Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-31afb-api: Enforce api names to be hookableJosé Bollo7-8/+8
Change-Id: Ic1d5cb208c636d3261e1a96c4a81b488cb84a60e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-31afb-hook: Allow to unhook some apisJosé Bollo2-33/+47
The apis starting with a $ (dollar) will not be tracked by hooks Change-Id: I3b83458c288ef1eb27993d4c71785b32e5a72deb Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-18jobs: Integrate systemd watchdog by defaultJosé Bollo1-0/+9
Change-Id: Iaa3ce3ee9188e3ddaf6ee70964963d29df78689f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-18jobs: Split jobs_get_sd_eventJosé Bollo1-5/+16
Provide a mutex locked internal function for getting the event loop: get_sd_event_locked Change-Id: I2635f901b3ec0fcf2c52f569f4c57cfd046601af Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-18afb-common: CleanupJosé Bollo1-25/+0
Change-Id: Ifc5adbdc92c3d034c92dd432c72057f3267c4964 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-18afb-hreq: Dichotomic mimetype searchJosé Bollo1-7/+11
Change-Id: I6d906c31cdcf07c5404f1eb81cd44683976465f7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-18afb-hreq: Sort mimetypesJosé Bollo1-9/+9
Change-Id: I45ae5a702b83dabe081b625b4bcaf5de33ffa1e6 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-18afb-hreq: Add json to known mimetypesLoïc Collignon1-0/+1
Change-Id: Ic11ebf7e569160dd25e66a1273904dfcd82bdeb8 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
2018-01-05afb-client-demo: Fix memory leakJosé Bollo1-0/+1
Change-Id: I636b95459715f3b272509eb76e304a49593fb527 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-05afb-api-so: Exclude directories starting with .José Bollo1-0/+42
Exclude from the search of bindings any directory starting with a dot (.) by default. It is possible to reactivate the prvious behaviour by defining the following preprocessor variables - AFB_API_SO_ACCEPT_DOT_PREFIXED_DIRS When this variable is defined, the directories starting with a dot are searched except if their name is "." or ".." or ".debug" - AFB_API_SO_ACCEPT_DOT_DEBUG_DIRS When this variable is defined and the variable AFB_API_SO_ACCEPT_DOT_PREFIXED_DIRS is also defined scans any directory not being "." or "..". The previous behaviour was like difining the 2 variables, meaning that only . and .. were excluded from the search. This change is intended to definitely solve the issue SPEC-662. Yocto installed the debugging symbols in the subdirectory .debug. For example the binding.so also had a .debug/binding.so file attached. Opening that debug file made dlopen crashing. See https://sourceware.org/bugzilla/show_bug.cgi?id=22101 Bug-AGL: SPEC-662 Change-Id: Ic38a83aaa5f16d938e504aba66597bb9a219c193 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-02afb-binding.hpp: Fix constexpr of 'binding'José Bollo1-1/+1
Change-Id: Icdee4029f11dcb6c0f75e945e0b411ea63654afe Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-12-21genskel: Add afb:: namespace prefixJosé Bollo1-3/+3
Change-Id: I0cd2d09f97fac7a1976d2bfcd5ab616472bf970a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-12-21genskel: Add option for C++ outputJosé Bollo1-10/+26
The option --cpp or -x tell to produce a C++ output that uses the 'constexpr' c++ feature. Change-Id: I4eda4d21260573acbb01057ed95476bd4fc7ebe5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-12-21sig-monitor: Handle signals in exitJosé Bollo1-2/+23
Change signal treatment when exit is called internally by sig-monitor. Change-Id: Ieb6261b2143811d7abcbc49b134e919c8c5626dc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-12-21sig-monitor: Make signal list globalJosé Bollo1-22/+22
Change-Id: I456a08dccf65d1a188e7bb7e0a6ab905ae823a25 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-12-18afb-hreq: Add predefined mime-typesJosé Bollo1-7/+18
Add mimetypes for common extensions for conformance to https://www.w3.org/TR/widgets/#rule-for-identifying-the-media-type-of-a-file Change-Id: I3ae51afbbc2916b7237e4fa546392ec7ec5ea42a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-12-05afb-api-ws: Make weak ws-client by default (to be fixed)José Bollo3-4/+16
The case of unicens service that can be here or not creates problem to the binding 4a when the service is not here. This commits makes the requirement of ws-client socket optional. This unblocks the situation but need to be fixed later. Bug-AGL: SPEC-1151 Change-Id: I569fa781c003492a4c6a7ad84c5b140ecdb05b65 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-12-04Remove unused and confusing filesJosé Bollo5-387/+0
Change-Id: I8362d8d7bf0f11a41ef2275614e9ef2bcf0fee29 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-12-01jobs: Fix locks in event loopsJosé Bollo1-11/+17
Change-Id: Ie07a9bc4f930a0ecd2102a94e7f5f7b0daa705ef Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-30jobs: Fix possible race conditionJosé Bollo1-2/+4
Sending the signal while not being sure that is is expected could be a race condition. Taking the mutex avoids it. In the same time, switch to broadcasting. Change-Id: I3f43d0d860cccc61ec140ceef223f572f806872c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-29afb-config: Check environment variablesJosé Bollo1-0/+35
The following environment variables allows several setting by the environment: * AFB_TRACEREQ, AFB_TRACEDITF, AFB_TRACESVC, AFB_TRACEEVT These variables allows setting of options --tracereq, --traceditf, --tracesvc, --traceevt * AFB_LDPATHS Set the option --ldpaths Change-Id: I22700c658ce3fa1ceb15eab8f67adaaf41627b8f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-29jobs: rewrite of the event loop handlingJosé Bollo1-106/+108
This new version use an eventfd to unlock the event loop when needed. This reduce the count of sd_event needed. Bug-AGL: SPEC-1091 Change-Id: I9bc273e89ab1a70ccc2187c2571e68c9c771ee25 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-29afb-ws & websocket: Fix writing very long dataJosé Bollo3-21/+47
This version loops to write very long data on websockets. Bug-AGL: SPEC-1091 Change-Id: I8f17e75e4ef483be29fa8cae2c0af159783ec2c6 Signed-off-by: José Bollo <jose.bollo@iot.bzh>