Re: Quick question regarding recent SOUP_ENCODING_EOF code



W. Michael Petullo wrote:
> I am using the recently added SOUP_ENCODING_EOF. I am finding that
> calling soup_message_body_complete () is not enough to cause libsoup to
> stop sending the "wrote_chunk" signal and instead send the "finished"
> signal. I have to actually call soup_message_finished ().
> 
> Everything works as long as I call soup_message_finished (), but this is
> not what is done in streaming-test.c. Is this expected?

You definitely shouldn't call soup_message_finished() yourself.

My guess would be that the message is getting paused, probably because
you're letting a wrote_chunk signal go by without adding another chunk.
If the I/O layer runs out of chunks, it will automatically call
soup_session_pause_message(), and you have to then unpause it yourself
after adding another chunk. The sample code always adds another chunk
before the I/O layer can run out, so it doesn't ever have to call
soup_session_unpause_message(), but if your code is written slightly
differently, it might have to.

-- Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]