[Pidgin] #7432: Dbus(libpurple-client) interface generate error (purple-client-bindings.c)

Pidgin trac at pidgin.im
Sat Nov 1 15:16:57 EDT 2008


#7432: Dbus(libpurple-client) interface generate error (purple-client-bindings.c)
----------------------+-----------------------------------------------------
Reporter:  Math2Gold  |        Type:  defect   
  Status:  new        |   Component:  libpurple
 Version:  2.5.2      |    Keywords:  dbus     
----------------------+-----------------------------------------------------
 function ''purple_conversation_new''  always return NULL on libpurple-
 client.

 i traced the code and checked this problem.
 i found this error is caused by PurpleConversationType  is converted to
 G_TYPE_INT  on dbus client side,but it is converted to UINT32 on dbus
 server side.

 i changed

 {{{
 PurpleConversation* purple_conversation_new(PurpleConversationType type,
 const PurpleAccount *account, const char *name) {
 int RESULT_ID = 0;
 dbus_g_proxy_call(purple_proxy, "PurpleConversationNew", NULL,
         G_TYPE_INT, type,       G_TYPE_INT, GPOINTER_TO_INT(account),
 G_TYPE_STRING, name,  G_TYPE_INVALID,
         G_TYPE_INT, &RESULT_ID,  G_TYPE_INVALID);
 return (PurpleConversation*) GINT_TO_POINTER(RESULT_ID);
 }
 }}}

 to

 {{{
 PurpleConversation* purple_conversation_new(PurpleConversationType type,
 const PurpleAccount *account, const char *name) {
 int RESULT_ID = 0;
 dbus_g_proxy_call(purple_proxy, "PurpleConversationNew", NULL,
         G_TYPE_UINT, type,      G_TYPE_INT, GPOINTER_TO_INT(account),
 G_TYPE_STRING, name,  G_TYPE_INVALID,
         G_TYPE_INT, &RESULT_ID,  G_TYPE_INVALID);
 return (PurpleConversation*) GINT_TO_POINTER(RESULT_ID);
 }

 }}}

 ''G_TYPE_INT, type'' changed to ''G_TYPE_UINT, type'' just.

 the function works.

 so i checked all PurpleConversationType and found the same problem on
 client side.

 as the file purple-client-bindings.c is generated by ./dbus-analyze-
 functions.py.  it would be rewritten while i compile it again.how to
 recover it without change the generated file directly?

-- 
Ticket URL: <http://developer.pidgin.im/ticket/7432>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list