Revision 755d5487f554cf585f3b988088dc20fad65d1bf6

Mark Doliner mark at
Wed Jul 11 02:52:30 EDT 2007

On Tue, 10 Jul 2007 18:51:40 -0400 (EDT), mshkutkov wrote
> -----------------------------------------------------------------
> Revision: 755d5487f554cf585f3b988088dc20fad65d1bf6
> Ancestor: 1b455e6f5ef8d75f46d5faa291a761ec59269586
> Author: mshkutkov at
> Date: 2007-07-10T21:19:49
> Branch: im.pidgin.soc.2007.remotelogging
> Modified files:
>         libpurple/connection.c
> ChangeLog:
> purple_connection_set_state was made nonblocking by using

I haven't been following the remotelogging branch, but this change seems weird
to me.  So will we need to change all code that calls purple_log_write() to
now call purple_log_write_nonblocking()?

Couldn't we just change purple_log_write() to always be nonblocking? 
purple_log_write() could strdup the message, and then free it after it's been
written to the file.  So you could get rid of the 'cb' parameter and just
handle it internally in log.c.  That way the callers of purple_log_write()
wouldn't need to re-implement it every time.

You could even optimize that a little bit so that purple_log_write() accepts a
true/false parameter that, when false it strdups the message, but when true it
takes ownership of the passed in message string and frees it when finished.


More information about the Devel mailing list