projects
/
project
/
ubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libubus: fix msgbuf reduction logic during receive
[project/ubus.git]
/
libubus.c
diff --git
a/libubus.c
b/libubus.c
index
83a2c43
..
be4e6ac
100644
(file)
--- a/
libubus.c
+++ b/
libubus.c
@@
-280,9
+280,10
@@
static int _ubus_connect(struct ubus_context *ctx, const char *path)
ctx->connection_lost = ubus_default_connection_lost;
ctx->pending_timer.cb = ubus_process_pending_msg;
ctx->connection_lost = ubus_default_connection_lost;
ctx->pending_timer.cb = ubus_process_pending_msg;
- ctx->msgbuf.data = calloc(UBUS_M
AX_MSGLEN
, sizeof(char));
+ ctx->msgbuf.data = calloc(UBUS_M
SG_CHUNK_SIZE
, sizeof(char));
if (!ctx->msgbuf.data)
return -1;
if (!ctx->msgbuf.data)
return -1;
+ ctx->msgbuf_data_len = UBUS_MSG_CHUNK_SIZE;
INIT_LIST_HEAD(&ctx->requests);
INIT_LIST_HEAD(&ctx->pending);
INIT_LIST_HEAD(&ctx->requests);
INIT_LIST_HEAD(&ctx->pending);