X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=ubusd.c;h=ba1ff07720fa3da7cf5576eecfddc1c9530ba391;hp=f060b380ce4fd442f1d160a0ab383b67fcffe5b8;hb=refs%2Fheads%2Fmaster;hpb=c09e4f06f0f54be8304fb4459445198920fea32e diff --git a/ubusd.c b/ubusd.c index f060b38..ba1ff07 100644 --- a/ubusd.c +++ b/ubusd.c @@ -146,7 +146,7 @@ static void ubus_msg_enqueue(struct ubus_client *cl, struct ubus_msg_buf *ub) } /* takes the msgbuf reference */ -void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub, bool free) +void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub) { int written; @@ -160,7 +160,7 @@ void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub, bool free) written = 0; if (written >= ub->len + sizeof(ub->hdr)) - goto out; + return; cl->txq_ofs = written; @@ -168,10 +168,6 @@ void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub, bool free) uloop_fd_add(&cl->sock, ULOOP_READ | ULOOP_WRITE | ULOOP_EDGE_TRIGGER); } ubus_msg_enqueue(cl, ub); - -out: - if (free) - ubus_msg_free(ub); } static struct ubus_msg_buf *ubus_msg_head(struct ubus_client *cl)