Age | Commit message (Collapse) | Author | Files | Lines |
|
New 'api' wrapper for 'afb_api_t' related functions.
Change-Id: I695b65ff3d27b0ecc0f95f660a13b7a98fd92223
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
|
|
Added move semantic and remove invalidation method as it's not used anymore
since we drop the support of APIv2.
Change-Id: If53840010d6f24d410712915051386190f55b504
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
|
|
The function was defined as many time as the header was included.
Making it a weak function fix the issue.
Also, a plain old C cast is required to make this constexpr valid.
Change-Id: I278f376e00ec6728272df4fde8ca8984195dd533
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
|
|
This new constexpr initialisation method accepts
a callback receiving a afb::req instead of a
afb_req_t.
Change-Id: I752e670b5545a9d7956987984e725b468196a6e9
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
It used the legacy callback definition of apiv2 instead
of the apiv3 one.
Change-Id: Iab281131a923ae59cfbbb50cf72fd4a5c3f11d65
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
|
|
The C++ interface is currently used only in APIv3.
Change-Id: Id1a3bca5dc8e69c1af229871e7f33192395230e7
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
|
|
Prefer the system path to include headers.
Change-Id: I08a64e8d27808084ea4592988f36b7e5099a7fc6
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
|
|
You can implement a C++ binding API by inheriting
the templated base class 'base_api_t' and overriding
the methods you want.
At the same time, the c++ files are now located in
in their own subdirectory: afb/c++
Change-Id: Ie02535961ec6b4b5ae21390cb520acb1fdc44c9e
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
|
|
Requests are already sequenced on need (noconcurrency
flag of bindings). Sequencing messages until their
completion has a side effect when dealing with events
and synchronous calls: event -> call -> reply locked
until event completion (see SPEC-2219).
This change could be reverted if events are converted
to jobs (see SPEC-2215).
Bug-AGL: SPEC-2219
Change-Id: Ia577bc54ba38291817fd5ed3e3dda1b67b2818b7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
Change-Id: I95fa03c430b9f488b3b5b9a9bdfc50a1ff0f0421
Signed-off-by: ronan <ronan.lemartret@iot.bzh>
|
|
The version of libmicrohttpd required is 0.9.60
at least.
Change-Id: Ia0784f5433d63d4de50654dd7577a8767578c069
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
The improvement was able to track the bug
SPEC-2163 by launching:
- ./stress-server.sh --ws --valgrind
- ./stress-clients.sh --null --count 20
Bug-AGL: SPEC-2163
Change-Id: I04634f0e98ab7a28df7c1d34ecc0d9c1faf43d57
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
This changes takes care to increment the
the count of reference before using it.
Bug-AGL: SPEC-2163
Change-Id: Ia7882427eeae933eeb5030aad025ebb1da129d6f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
Change-Id: I3aaa92b2bfb01699ee8ae609272e93032b6f1a9d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
Change-Id: I53c43380902f96b7a46a6a131a956965d7cf6fbc
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
The internal functions blocking threads
for implementing call_sync were not releasing
the event loop, leading to deafness of the
binder.
Include a tuto-4 that reproduce the issue
on a binder with the bug and that also shows
interesting usages of the binder.
Bug-AGL: SPEC-2161
Change-Id: I83ad4d55d721a6046e798a5e06967df4dd5a7284
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
* changes:
hello3: Fix warning unused variable
afb-hsrv: Avoid call to getnameinfo
jobs: Remove conditionnal REMOVE_SYSTEMD_EVENT
jobs: Separate internal threads from others
jobs: Refactor event loop handling
afb-proto-ws: Serialize incoming message
|
|
The variable 'calling' was not used anymore.
Change-Id: I3a041cee57b2682374084003415d13a77a554fba
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Calling getnameinfo may block the program
a long time (5s) when address is zero.
Bug-AGL: SPEC-2133
Change-Id: Id52b2989c5e996363fd4b6f39049f059a6ee97a2
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
The removal of the systemd event loop will be made
in later changes.
Change-Id: Ia6c52feb4969f360c31cbfc50ae991f1767f007d
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Foreign threads, that are not started by jobs,
are allowed to use synchronous jobs_call/job_leave
(directly or indirectly).
This commit ensure that those foreign thread will
neither acquire the eventloop nor execute jobs.
Includes a tiny cleanup of remain usage.
Bug-AGL: SPEC-2089
Change-Id: I2ad7fcfe2c276e34bdc4ec0c2aa3a4207bea1854
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
This improves the arbitration of the single event
loop across threads.
Before introduction of using 'evenfd' there was
several event loop. At the current time, there
is only one. At the end, there will probably
remain only one.
Bug-AGL: SPEC-2089
Change-Id: Iac9db7cbe15b4c9c76e6e9a8f6e641ed2a9039e0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
Enforce serialisation for a connection
Bug-AGL: SPEC-2089
Change-Id: Id9f261b7cc02fda78922dc511856c34b7c5bf56d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
app-framework-binder dependency on libmicrohttpd version
has been set at least to 0.9.62
Change-Id: If6af70611a5cd6236068781437e4bcbd28f368b7
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
|
|
|
|
Change-Id: I170e127ebf96d2accfdd6d6a4ec322afeaa2782f
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
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>
|
|
Fixing names and number of samples in packaging
could be avoided.
Change-Id: I57355e68be45e1a4fdd6d76bcd44dea57ca63813
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: I25c5efebc281f774324851372d2d074e31988847
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
|
|
Change-Id: I3eb4e922cb5106bcf8a1ccc5e1b010bd0a60bf34
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
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>
|
|
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>
|
|
SPEC-1988
Change-Id: Ida94e5cf39b8c23efca9620d62ec2db55746d2b3
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
|
|
Change-Id: I58c88f8bcaf4cfb8a53b58eeefd7fa3415bf894a
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: I170abe0dd1a1de3d2cc2ea7f86c746eb93e63eae
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
Change-Id: I3ae51611b92762a4f09b1f6cca6ff27853cd9f95
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
Change-Id: I2869a2a840fb07550d493ddc2d651358892d33d1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
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>
|
|
|
|
|
|
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>
|
|
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>
|
|
Change-Id: I909493166f98f152e5aeb02a72f40bc3c58b42b2
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
|
|
Change-Id: I5bef17178e972e73b653ddbff5a8b09cfc2287eb
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|