Problem connecting to jabber server

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem connecting to jabber server

Luca Bertoncello
Hi list!

I wrote a little program using libpurple to send messages from programs.
It works very good with ICQ, but now I need to use Jabber, too...

Unfortunately I cannot connect to my Jabber-server...
In the logs of prosody I can just see:

Sep 24 10:49:31 c2s1de6560      info    Client connected

But no authentication...

Here my code:

  account = purple_account_new(cfg.login, "prpl-jabber");
  purple_account_set_password(account, cfg.password);
  purple_account_set_string(account, "server", cfg.server);
  purple_account_set_int(account, "port", cfg.port);
  purple_account_set_bool(account, "require_tls", TRUE);
  purple_account_set_bool(account, "auth_plain_in_clear", TRUE);
  purple_account_set_enabled(account, UI_ID, TRUE);
  status = purple_savedstatus_new("ONLINE", PURPLE_STATUS_AVAILABLE);
  purple_savedstatus_activate(status);

what am I doing wrong?

Thanks a lot!
Luca Bertoncello
([hidden email])

_______________________________________________
Devel mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem connecting to jabber server

Duncan Berriman-2
I have a similar program and the only difference I can see is I have a

purple_accounts_add(account);

before

purple_account_set_enabled;

If and when I have to reconnect I do
                                                               
purple_account_set_password(account, password);
purple_account_connect(account);

Regards
Duncan

On Sat, Sep 24, 2016 at 9:51 AM, Luca Bertoncello <[hidden email]> wrote:
Hi list!

I wrote a little program using libpurple to send messages from programs.
It works very good with ICQ, but now I need to use Jabber, too...

Unfortunately I cannot connect to my Jabber-server...
In the logs of prosody I can just see:

Sep 24 10:49:31 c2s1de6560      info    Client connected

But no authentication...

Here my code:

  account = purple_account_new(cfg.login, "prpl-jabber");
  purple_account_set_password(account, cfg.password);
  purple_account_set_string(account, "server", cfg.server);
  purple_account_set_int(account, "port", cfg.port);
  purple_account_set_bool(account, "require_tls", TRUE);
  purple_account_set_bool(account, "auth_plain_in_clear", TRUE);
  purple_account_set_enabled(account, UI_ID, TRUE);
  status = purple_savedstatus_new("ONLINE", PURPLE_STATUS_AVAILABLE);
  purple_savedstatus_activate(status);

what am I doing wrong?

Thanks a lot!
Luca Bertoncello
([hidden email])

_______________________________________________
Devel mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/devel
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




_______________________________________________
Devel mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem connecting to jabber server

Luca Bertoncello
Duncan Berriman <[hidden email]> schrieb:

> I have a similar program and the only difference I can see is I have a
>
> purple_accounts_add(account);
>
> before
>
> purple_account_set_enabled;
>
> If and when I have to reconnect I do
>
> purple_account_set_password(account, password);
> purple_account_connect(account);

Unfortunately it does not work... :(

Could you send me your code, to double check?

Thanks
Luca Bertoncello
([hidden email])

_______________________________________________
Devel mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/devel
Loading...