diff options
-rw-r--r-- | ubusd.c | 2 | ||||
-rw-r--r-- | ubusd_main.c | 1 |
2 files changed, 2 insertions, 1 deletions
@@ -154,7 +154,7 @@ static void ubus_msg_enqueue(struct ubus_client *cl, struct ubus_msg_buf *ub) INIT_LIST_HEAD(&ubl->list); ubl->msg = ubus_msg_ref(ub); - list_add_tail(&cl->tx_queue, &ubl->list); + list_add_tail(&ubl->list, &cl->tx_queue); cl->txq_len += ub->len; } diff --git a/ubusd_main.c b/ubusd_main.c index 4ea5245..d454b1a 100644 --- a/ubusd_main.c +++ b/ubusd_main.c @@ -78,6 +78,7 @@ static void client_cb(struct uloop_fd *sock, unsigned int events) if (cl->txq_ofs < ub->len + sizeof(ub->hdr)) break; + cl->txq_ofs = 0; ubus_msg_list_free(ubl); } |