summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2018-02-15afb-config: Increase the default timeout of sessionseel_5.0.2eel/5.0.25.0.2José 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: I502a45e3c94f0c4633a80b68619a6e608ad36e7a 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: I77ccb79975c6f2ac1a276031d9fd1c03839c3b91 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-05afb-api-so: Exclude directories starting with .eel_5.0.1eel/5.0.15.0.1José 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: I7b4984cce992e6c4d9b583a6e1ddf2463f419d10 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-03genskel: Add afb:: namespace prefixJosé Bollo1-3/+3
Change-Id: I0cd2d09f97fac7a1976d2bfcd5ab616472bf970a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-03genskel: 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>
2018-01-03sig-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>
2018-01-03sig-monitor: Make signal list globalJosé Bollo1-22/+22
Change-Id: I456a08dccf65d1a188e7bb7e0a6ab905ae823a25 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-01-03afb-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-07afb-api-ws: Make weak ws-client by default (to be fixed)eel_4.99.4eel/4.99.44.99.4José 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-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-30afb-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-30jobs: 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-30fixup! afb-ws & websocket: Fix writing very long dataJosé Bollo1-0/+1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-28afb-ws & websocket: Fix writing very long dataJosé Bollo3-21/+46
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>
2017-11-20CMAKE: refactor optionseel_4.99.3eel/4.99.34.99.3José Bollo6-18/+3
The option ALLOW_NO_BINDER is removed and the option ONLY_DEVTOOLS is introduced. Change-Id: Ia19eb977ee25a3871582605028fdef75e552363f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-20Merge "Fix build for native package"José Bollo1-3/+5
2017-11-20Fix build for native packageRonan Le Martret1-3/+5
* If the package is natively compile, the gcc used is the host gcc, and host gcc version must be >4.9. This is unneeded for the mode ALLOW_NO_BINDER (like in native). Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2017-11-17fix build errorJosé Bollo1-1/+1
Change-Id: I6ff16055597d36290f50b40d6dfe960aea691652 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-17afb-proto-ws: Fix autolock in proto-wsJosé Bollo4-50/+249
Because a systemd event loop can not be reentered while evaluating an event callback, the event loop was removed from the threads. It had the effect to enter in deadlock when calling a synchronous call while in an event callback. Queueing a job solves the issue. But because using queued job has implications on libafbws, a fake job manager is added for libafbws. Change-Id: Id793bea55743790082eaab48cd4cc87f7993772a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-17CMAKE: allow to compile afb-genskel onlyJosé Bollo1-1/+8
When missing components are detected, allows to not compile the binder if ALLOW_NO_BINDER is ON Change-Id: I0fb27844e3f36d4dd643bdf250f05b4f6769bc53 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-13afb-export: Ensure monitoring of eventsJosé Bollo2-1/+2
Change-Id: Id82c624f695a229023447c16652bcc912b6d6fed Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-11afb-proto-ws: fix self locking issueJosé Bollo1-29/+82
Calling synchronously a verb on an event of the same API was blocking. Change-Id: I58a988c6df8c60cd3a38c3cdff23d7be8b6be54e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-07afb-stub-ws: autoclose session on disconnectionJosé Bollo3-1/+12
Change-Id: If46ca2fa34a080b7087edb4e0da109c5ee85b14f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-07afb-stub-ws: manage closed sessionsJosé Bollo3-47/+76
Change-Id: I16620f12719c222c0da03caf330a865149fe9051 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-07afb-session: improve namingJosé Bollo1-12/+12
Change-Id: I6692f9089be355995d5caf979f4344ed3b8337a7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-07afb-stub-ws: Track sessions for releasing itJosé Bollo1-0/+47
Change-Id: If0ff0f491e0fd8267137aa742d7acbe0157f88ad Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-06afb-session: Improve readabilityJosé Bollo1-28/+34
Change-Id: I4035a59d125e0768b0366c3dc5e7509e416ab9c6 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-06afb-session: fix reference countingJosé Bollo2-7/+21
Change-Id: If36c9210f0982ba35299de52f0c8fd96e7c836e2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-06afb-session: optimizationJosé Bollo1-104/+103
Change-Id: Ic3b0ec8e7bcbf21f7ae3a9f2b1a5719118a7912d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-06afb-session: add commentsJosé Bollo1-19/+64
Change-Id: I88026384d3f5e98659fba2bb774e41e931d45f51 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-06afb-session: remove unused access timeJosé Bollo1-3/+0
Change-Id: I1e8ca2adfec5bf7df5a7da02e6d093ae099ec9a3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-06afb-session: Add timeout features for sessionsJosé Bollo4-13/+24
Change-Id: I0aa8a82c0bbf709aa380ef7e5efe2e4ebaf454c0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-06afb-session: add function afb_session_searchJosé Bollo3-11/+29
Also the function afb_session_get always create a session even if 'created' is NULL Change-Id: Ia5ac1231e1d61e92cb9bbc07c968e3000d6864ff Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-06afb-trace: improve and simplify session managementJosé Bollo1-70/+37
Change-Id: I828e0498bc68c9f1d1635a886e0a93fcb2d2389c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-06afb-session: improves comments and namesJosé Bollo1-3/+6
Change-Id: I05850b05dc6747563ef38800821bfcaf5c45b5d0 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-06afb-session: redefine the function 'afb_session_create'José Bollo4-13/+7
Change-Id: Ib8a66af30ea2438248adb66c9a95ac82663ec223 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-06afb-session: rewrite of cookie handlingJosé Bollo1-69/+34
Change-Id: I9852c1e2a211f79f25c7f32e9ac93acf7c5e6968 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-03Add 'noconcurrency' when creating dynamic APIeel_4.99.2eel/4.99.24.99.2José Bollo3-4/+7
Change-Id: Ia108b23b9480bb32f27127ef00c18086fcf86752 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-03afb-proto-ws: Fix unclosed file descriptorJosé Bollo1-0/+1
Change-Id: I3c831b4f803e283fc692fef66621a798a5e9296e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-03jobs: Improve event loop integrationJosé Bollo1-58/+64
The previous implmentation was buggy. This changes make the event loop a thread global variable. A thread now refuses to run an event loop if it is in dispatching state. Change-Id: Ic29792b87c1cae201958feb96d93678f6d37ac8d Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-01verbose: Ensure mutual exclusion when loggingJosé Bollo1-0/+5
Change-Id: I3ccc2ba35ee8db3d62eb229c736e65b2305184e3 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-23websocket: Add function that explain error codesJosé Bollo2-0/+23
Change-Id: I500520edac6792013650fa3cb0e02d0b9f5610d5 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-23websocket: cleanupJosé Bollo1-1/+0
Change-Id: I772e441f1b93131df670ef3fbef3a37e2a2c00f1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-23websocket: Tune maximum received lengthJosé Bollo2-1/+18
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>
2017-10-23afb-api-dyn: Uniform return 0 on successJosé Bollo1-1/+1
Change-Id: I6ca079fa84547928f999e07d1925202a1e14850f Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-16afb-api-so: improve error messagesJosé Bollo1-1/+1
Change-Id: I3bbf11890800a8b05c9cfaa8bd10b50a0b22c245 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-12afb-stub-ws: Always validate clients of stub-wsJosé Bollo1-0/+1
Change-Id: I2c020d586e6f22e47dac8ddb50c8ee9ca9c46b2e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-10-11libafbwsc: add function 'afb_ws_client_connect_api'José Bollo5-33/+335
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>
2017-10-11afb-proto-ws: remove dependenciesJosé Bollo3-22/+13
Remove dependencies to verbose and to afb-common. Change-Id: I140f2cd7c159e9be994ab7b786a164d605d1b1dc Signed-off-by: José Bollo <jose.bollo@iot.bzh>