1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

DIsabling tls on server

This commit is contained in:
James Booth 2012-02-26 03:15:42 +00:00
parent 400a099edd
commit d6ac3c3347
3 changed files with 15 additions and 2 deletions

View File

@ -21,6 +21,7 @@
*/
#include <string.h>
#include <strophe.h>
#include "jabber.h"
#include "log.h"
@ -80,6 +81,12 @@ int jabber_connect(char *user, char *passwd)
xmpp_conn_set_jid(_conn, user);
xmpp_conn_set_pass(_conn, passwd);
// hack to not attempt tls on framework
char *domain = strchr(user, '@');
domain++;
if (strcmp(domain, "framework") == 0)
xmpp_conn_disable_tls(_conn);
int connect_status = xmpp_connect_client(_conn, NULL, 0, _jabber_conn_handler, _ctx);
if (connect_status == 0) {

2
log.h
View File

@ -25,8 +25,6 @@
#include <stdio.h>
#include <strophe/strophe.h>
// log areas
#define PROF "prof"
#define CONN "conn"

View File

@ -156,6 +156,14 @@ int main(int argc, char **argv)
xmpp_conn_set_pass(conn, argv[2]);
/* initiate connection */
char *domain = strchr(argv[1], '@');
domain++;
printf("Domain = %s\n", domain);
if (strcmp(domain, "framework") == 0)
xmpp_conn_disable_tls(conn);
xmpp_connect_client(conn, NULL, 0, conn_handler, ctx);
printf("CONNECT CLIENT CALLED\n");