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
Add gitreview file for Kooky Koi branch
[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
10c06fc
..
3365d60
100644
(file)
--- a/
src/afb-proto-ws.c
+++ b/
src/afb-proto-ws.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2015-20
19
"IoT.bzh"
+ * Copyright (C) 2015-20
20
"IoT.bzh"
* Author José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Author José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@
-670,11
+670,11
@@
static void client_on_reply(struct afb_proto_ws *protows, struct readbuf *rb)
static void client_on_description(struct afb_proto_ws *protows, struct readbuf *rb)
{
static void client_on_description(struct afb_proto_ws *protows, struct readbuf *rb)
{
- uint
32
_t descid;
+ uint
16
_t descid;
struct client_describe *desc, **prv;
struct json_object *object;
struct client_describe *desc, **prv;
struct json_object *object;
- if (readbuf_uint
32
(rb, &descid)) {
+ if (readbuf_uint
16
(rb, &descid)) {
pthread_mutex_lock(&protows->mutex);
prv = &protows->describes;
while ((desc = *prv) && desc->descid != descid)
pthread_mutex_lock(&protows->mutex);
prv = &protows->describes;
while ((desc = *prv) && desc->descid != descid)
@@
-970,13
+970,13
@@
overflow:
afb_proto_ws_unref(protows);
}
afb_proto_ws_unref(protows);
}
-static int server_send_description(struct afb_proto_ws *protows, uint
32
_t descid, struct json_object *descobj)
+static int server_send_description(struct afb_proto_ws *protows, uint
16
_t descid, struct json_object *descobj)
{
int rc = -1;
struct writebuf wb = { .iovcount = 0, .bufcount = 0 };
if (writebuf_char(&wb, CHAR_FOR_DESCRIPTION)
{
int rc = -1;
struct writebuf wb = { .iovcount = 0, .bufcount = 0 };
if (writebuf_char(&wb, CHAR_FOR_DESCRIPTION)
- && writebuf_uint
32
(&wb, descid)
+ && writebuf_uint
16
(&wb, descid)
&& writebuf_object(&wb, descobj))
rc = proto_write(protows, &wb);
return rc;
&& writebuf_object(&wb, descobj))
rc = proto_write(protows, &wb);
return rc;