diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2019-01-18 18:28:56 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@automotivelinux.org> | 2019-01-18 18:28:56 +0000 |
commit | 77bf8a30c07a4ab5690337ed362dae4414e590fb (patch) | |
tree | 253c2429541ce9cd2532602f96bea368355cdeb4 /src/afb-proto-ws.c | |
parent | a4bb03e57aa2f8b71840ec384356f6c283989d73 (diff) | |
parent | 194031d38a246e1aec441cb6acaaf6915c07b59b (diff) |
Merge changes from topic 'spec-2089'guppy_6.99.4guppy/6.99.46.99.4
* 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
Diffstat (limited to 'src/afb-proto-ws.c')
-rw-r--r-- | src/afb-proto-ws.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/afb-proto-ws.c b/src/afb-proto-ws.c index f74869cf..f4070860 100644 --- a/src/afb-proto-ws.c +++ b/src/afb-proto-ws.c @@ -35,7 +35,6 @@ #include "afb-ws.h" #include "afb-msg-json.h" #include "afb-proto-ws.h" -#include "jobs.h" #include "fdev.h" #include "verbose.h" @@ -161,7 +160,7 @@ struct afb_proto_ws void (*on_hangup)(void *closure); /* queuing facility for processing messages */ - int (*queuing)(void (*process)(int s, void *c), void *closure); + int (*queuing)(struct afb_proto_ws *proto, void (*process)(int s, void *c), void *closure); }; /******************* streaming objects **********************************/ @@ -348,7 +347,7 @@ static void queue_message_processing(struct afb_proto_ws *protows, char *data, s binary->rb.head = data; binary->rb.end = data + size; if (!protows->queuing - || protows->queuing(processing, binary) < 0) + || protows->queuing(protows, processing, binary) < 0) processing(0, binary); return; } @@ -1068,7 +1067,7 @@ void afb_proto_ws_on_hangup(struct afb_proto_ws *protows, void (*on_hangup)(void protows->on_hangup = on_hangup; } -void afb_proto_ws_set_queuing(struct afb_proto_ws *protows, int (*queuing)(void (*)(int,void*), void*)) +void afb_proto_ws_set_queuing(struct afb_proto_ws *protows, int (*queuing)(struct afb_proto_ws*, void (*)(int,void*), void*)) { protows->queuing = queuing; } |