diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-02-05 20:50:08 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-02-05 20:50:08 +0100 |
commit | a84c6cac9a8e57cfdbedb82f96e38079e3871995 (patch) | |
tree | afb1c5e9ddbd83aed9191954fdc917596e4c5c3f /ubusd_proto.c | |
parent | f6a6b0d492900b7a087a8a89d11fa5b94f4c5cb5 (diff) | |
download | ubus-a84c6cac9a8e57cfdbedb82f96e38079e3871995.tar.gz |
fix message buffering
Diffstat (limited to 'ubusd_proto.c')
-rw-r--r-- | ubusd_proto.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ubusd_proto.c b/ubusd_proto.c index 2e84556..3333330 100644 --- a/ubusd_proto.c +++ b/ubusd_proto.c @@ -58,14 +58,14 @@ bool ubusd_send_hello(struct ubus_client *cl) return false; ubus_msg_init(ub, UBUS_MSG_HELLO, 0, cl->id.id); - ubus_msg_send(cl, ub); + ubus_msg_send(cl, ub, true); return true; } static int ubusd_send_pong(struct ubus_client *cl, struct ubus_msg_buf *ub, struct blob_attr **attr) { ub->hdr.type = UBUS_MSG_DATA; - ubus_msg_send(cl, ubus_msg_ref(ub)); + ubus_msg_send(cl, ub, false); return 0; } @@ -86,7 +86,7 @@ static int ubusd_handle_publish(struct ubus_client *cl, struct ubus_msg_buf *ub, if (!ub) return UBUS_STATUS_NO_DATA; - ubus_msg_send(cl, ub); + ubus_msg_send(cl, ub, true); return 0; } @@ -111,7 +111,7 @@ static void ubusd_send_obj(struct ubus_client *cl, struct ubus_msg_buf *ub, stru if (!ub) return; - ubus_msg_send(cl, ub); + ubus_msg_send(cl, ub, true); } static int ubusd_handle_lookup(struct ubus_client *cl, struct ubus_msg_buf *ub, struct blob_attr **attr) @@ -195,7 +195,7 @@ static int ubusd_handle_invoke(struct ubus_client *cl, struct ubus_msg_buf *ub, ub->hdr.type = UBUS_MSG_INVOKE; ub->hdr.peer = cl->id.id; - ubus_msg_send(obj->client, ub); + ubus_msg_send(obj->client, ub, true); return -1; } @@ -221,7 +221,7 @@ static int ubusd_handle_response(struct ubus_client *cl, struct ubus_msg_buf *ub goto error; ub->hdr.peer = blob_get_int32(attr[UBUS_ATTR_OBJID]); - ubus_msg_send(cl, ub); + ubus_msg_send(cl, ub, true); return -1; error: @@ -260,7 +260,7 @@ void ubusd_receive_message(struct ubus_client *cl, struct ubus_msg_buf *ub) ubus_msg_free(ub); *retmsg_data = htonl(ret); - ubus_msg_send(cl, ubus_msg_ref(retmsg)); + ubus_msg_send(cl, retmsg, false); } static void __init ubusd_proto_init(void) |