[evolution-patches] Re: soup-transfer refcounting



On Thu, 2003-06-12 at 23:20, Dan Winship wrote:
> This makes SoupReaders and SoupWriters be refcounted, which should
> hopefully fix any remaining lurking double-free problems. (I hope.)
> 
> The basic idea is that the giochannel watch holds one ref and the
> SoupMessage holds another, and the soup-transfer code occasionally holds
> transient refs when it needs to keep the reader/writer from being
> destroyed out from under it. I also got rid of the
> SOUP_TRANSFER_END/SOUP_TRANSFER_CONTINUE return values in a few places,
> since the callback can just use a cancel function instead, and the code
> has to be able to deal with that case already, so the return value is
> redundant (particularly since in the only place where it ever did return
> SOUP_TRANSFER_END, it was also cancelling it).
> 
> I've been running with these patches for a day now with no problems, but
> I don't know how much testing the edge cases get in normal use...

Unfortunately I haven't really gotten a chance to review and test the
patch since I'm at GUADEC, but it looks okay from a cursory look.  It's
probably worthwhile to just check it in so that the rcd snaps build
against it and have our QA guys test all the network stuff to make sure
it doesn't crash.

Joe




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