Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
afb-proto-ws: Serialize incoming message
[src/app-framework-binder.git]
/
src
/
afb-proto-ws.c
diff --git
a/src/afb-proto-ws.c
b/src/afb-proto-ws.c
index
86112a3
..
1f7039e
100644
(file)
--- 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 "afb-ws.h"
#include "afb-msg-json.h"
#include "afb-proto-ws.h"
-#include "jobs.h"
#include "fdev.h"
struct afb_proto_ws;
#include "fdev.h"
struct afb_proto_ws;
@@
-160,7
+159,7
@@
struct afb_proto_ws
void (*on_hangup)(void *closure);
/* queuing facility for processing messages */
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 **********************************/
};
/******************* streaming objects **********************************/
@@
-347,7
+346,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
binary->rb.head = data;
binary->rb.end = data + size;
if (!protows->queuing
- || protows->queuing(processing, binary) < 0)
+ || protows->queuing(pro
tows, pro
cessing, binary) < 0)
processing(0, binary);
return;
}
processing(0, binary);
return;
}
@@
-1055,7
+1054,7
@@
void afb_proto_ws_on_hangup(struct afb_proto_ws *protows, void (*on_hangup)(void
protows->on_hangup = on_hangup;
}
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;
}
{
protows->queuing = queuing;
}