Unable to reconnect an account
Eric PTAK
eric.ptak.fr at gmail.com
Thu Mar 13 04:55:45 EDT 2008
Hi all,
I'm still in trouble with my non working code I use to (re)connect an
account :
void enable_account(PurpleAccount *account) {
if ((account) && !purple_account_get_enabled(account, UI_ID)) {
LM_DBG("account %s disabled, enabling...\n",
account->username);
purple_account_set_enabled(account, UI_ID, TRUE);
}
if ((account) && purple_account_is_disconnected(account)) {
LM_DBG("account %s disconnected, reconnecting...\n",
account->username);
purple_account_connect(account);
}
}
It works after account creation, but not after a disconnect.
Am I using libpurple correctly ?
Thanks,
Eric.
2008/3/10, Eric PTAK <eric.ptak.fr at gmail.com>:
>
> Hi everyone !
>
> I'm currently integrating libpurple in a server so I use it without user
> interface and based on nullclient.
> I can create dynamicly accounts and connect them but I can't reconnect
> after disconnecting. This is the use case :
>
> 1/ Connecting
> * the server creates an account and adds it to accounts
> * the server enable the account, so I receive "account-enabled" signal
> * the server connects the account, so I receive "signing-on" then
> "signed-on" signals
> * finally the server sets the saved-status to available.
>
> ... some time later ...
>
> 2/ Disconnecting :
> * the server sets the saved status to offline, I receive "signed-off"
> signal
> * the server disable the account, it receives "account-disable" signal
>
> ... some time later ...
>
> 3/ Reconnecting
> the server first tries to enable the account, then receives
> "account-enabled" signal
> the server also tries to connect the account (because purple return it
> disconnected), nothing happens
> the server then also tries to sets the saved-status to available, but
> nothing hapens too
>
> There is no signal received, neither "signing-on", and the debug output
> it very limited :
> (11:07:41) account: Connecting to account eric.ptak at hotmail.fr (11:07:41)
> account: Connecting to account eric.ptak at hotmail.fr
>
> I think the first line correspond to the connection try, and the second to
> the status set try.
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20080313/45663119/attachment.html>
More information about the Devel
mailing list