Hi Mohamed,

> 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;
>  }

I was going to apply this patch, but what is actually wrong with this
one? So bytes_written return the actual written bytes and it can happen
that we have have written some. The number bytes we have written should
be erased Independent from the return value, right?

Regards

Marcel



_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to