Bug in output_http.c on HTTP_MAX_QUEUED check

Konstantin Shpinev mail at ksotik.com
Thu Nov 10 14:38:22 CET 2011


Hi!

I found the bug in file output_http.c at line 109:

Code was:
        if (http_get_queue(hr->hc) > HTTP_MAX_QUEUED) {
                hr->overflow++;
                if (hr->overflow > HTTP_MAX_OVERFLOW)
                        output_remove_receiver(hr);
                return;
        }
        hr->overflow=0;

Need change to (add "elso" statement after "if"):

        if (http_get_queue(hr->hc) > HTTP_MAX_QUEUED) {
                hr->overflow++;
                if (hr->overflow > HTTP_MAX_OVERFLOW)
                        output_remove_receiver(hr);
                return;
        } else {
                hr->overflow=0;
        }

Otherwise hr->overflow counter is resetting anytime, and condition:
if (hr->overflow > HTTP_MAX_OVERFLOW) never happens.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gt.owl.de/pipermail/getstream/attachments/20111110/79a26652/attachment.html>


More information about the Getstream mailing list