In process_send_buffer function we should not do call
    g_string_erase(buf, 0, bytes_written);
    if we get G_IO_STATUS_AGAIN. we should try again to send same data
    on next G_IO_OUT signal.

diff --git a/gweb/gweb.c b/gweb/gweb.c
index a348cdd..2533a3a 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -402,7 +402,8 @@ static gboolean process_send_buffer(struct web_session 
*session)
        if (status != G_IO_STATUS_NORMAL && status != G_IO_STATUS_AGAIN)
                return FALSE;
 
-       g_string_erase(buf, 0, bytes_written);
+       if (status == G_IO_STATUS_NORMAL)
+               g_string_erase(buf, 0, bytes_written);
 
        return TRUE;
 }
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to