#175: libpurple API called from different threads
----------------------+-----------------------------------------------------
 Reporter:  cavedon   |       Owner:  vadim      
     Type:  defect    |      Status:  new        
 Priority:  critical  |   Milestone:  QuteCom 2.3
Component:  misc      |     Version:  2.2-RC3    
 Keywords:            |  
----------------------+-----------------------------------------------------
 libpurple is not thread safe add all API must be called from the *same*
 thread:
 http://developer.pidgin.im/wiki/WhatIsLibpurple#Isitthreaded

 In the current implementation, libpurple is initialized in
 PurpleIMFactory::PurpleIMInit(), but all other operations are handled by a
 glib event loop PurpleMainEventLoop() running in a seperate thread created
 by PurpleIMFactory::PurpleIMFactory

 For this reason, libpurple might crash in very weird ways (as I actually
 found trying to use an external libpurple compiled against nss).

 I think the easiest way should be handling initialization and every call
 to libpurple de-initialization of liburple inside that glib loop (which is
 created before initializing libpurple).

 The alternative, more efficient, would be to get rid of the glib event
 loop and sue WengoPhone::runEvents() even loop also for libpurple. I do
 not know how hard it is tough, as it should also handle event on sockets.

-- 
Ticket URL: <http://trac.qutecom.org/ticket/175>
QuteCom <http://trac.qutecom.org>

_______________________________________________
QuteCom-dev mailing list
[email protected]
http://lists.qutecom.org/mailman/listinfo/qutecom-dev

Reply via email to