[OpenWrt-Devel] [PATCH V2 uclient] support for connection timeout

John Szakmeister john at szakmeister.net
Fri Jan 16 05:01:49 EST 2015


On Fri, Jan 16, 2015 at 4:42 AM, Rafał Miłecki <zajec5 at gmail.com> wrote:
[snip]
> -       if (uh->state == HTTP_STATE_RECV_DATA && uc->cb->data_read)
> -               uc->cb->data_read(uc);
> +       if (uh->state == HTTP_STATE_RECV_DATA)
> +               /* Now it's uclient user turn to read some data */
> +               uloop_timeout_cancel(&uc->connection_timeout);
> +
> +               if (uc->cb->data_read)
> +                       uc->cb->data_read(uc);

The above snippet doesn't look right.  I think you probably
meant to add curly braces around the block:

    if (uh->state == HTTP_STATE_RECV_DATA) {
        // ...
    }

-John
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list