purple_conv_im_send works not as expected
anatoliy at belsky.info
Sat Nov 24 11:42:03 EST 2007
Thanks for the answer, Atamurad.
But with the change it shows no more the connected message ... and the account
not gets online any more.
With my old code I became now some new message:
Username: account1 at hotmail.com
Sending a message
(account2 at hotmail.com) (17:19:25) account1 at hotmail.com: hi there!
(account2 at hotmail.com) (17:19:31) AccountName2: account2 at hotmail.com is now
known as AccountName2.
Account connected: account2 at hotmail.com prpl-msn
(account2 at hotmail.com) (17:20:25) AccountName2: Message could not be sent
because an error with the switchboard occurred
so something with the switchboard ...
thank you for the help .. i'm not yet giving up ... i want to do the php
On Saturday 24 November 2007 16:59, you wrote:
> I have no idea what's wrong with your code, but you can try it with
> static void on_connected(PurpleConnection *gc)
> printf("Connected! %s\n", gc->account->username);
> Then fill in PurpleConenctionUiOps structure;
> static PurpleConnectionUiOps conn_ui_ops =
> Add following line to init_libpurple()
> Anatoliy Belsky wrote:
> > Thanks for the answer, Daniel.
> > Sorry, the connection to the signal was there too .. I'm playing with the
> > nullclient ... so the full code fragment would be as:
> > account = purple_account_new(name, prpl);
> > purple_account_set_password(account, password);
> > purple_account_set_enabled(account, UI_ID, TRUE);
> > status = purple_savedstatus_new(NULL, PURPLE_STATUS_AVAILABLE);
> > purple_savedstatus_activate(status);
> > static int handle;
> > purple_signal_connect(purple_connections_get_handle(), "signed-on",
> > &handle, PURPLE_CALLBACK(signed_on), NULL);
> > conv = purple_conversation_new(PURPLE_CONV_TYPE_IM,
> > account, "account2 at hotmail.com)");
> > purple_conv_im_send(PURPLE_CONV_IM(conv), "hi there!");
> > It still not works. The nullclient brings the following output:
> > Username: account1 at hotmail.com
> > Password:
> > Starting conversation
> > Sending a message
> > (account2 at hotmail.com) (16:08:24) account1 at hotmail.com: hi there!
> > (account2 at hotmail.com) (16:08:35) AccountName2: account2 at hotmail.com is
> > now known as AccountName2.
> > Account connected: account1 at hotmail.com prpl-msn
> > As you can see, the account connected message comes after the message was
> > sent. The signed_on callback function returns immediately after it was
> > called.
> > Actually I'm writing the php binding for purple, this makes things more
> > complicated. But this code was probed with pure c.
> > May be you have an idea, how can I catch the moment, where the account
> > was connected?
> > regards
> > --Anatoliy
> > _______________________________________________
> > Devel mailing list
> > Devel at pidgin.im
> > http://pidgin.im/cgi-bin/mailman/listinfo/devel
More information about the Devel