Package: bitlbee
Version: 0.92-1
Severity: normal
Tags: patch
A patch is available upstream to support google's new instant messaging
service.
http://get.bitlbee.org/patches/bitlbee-jabberserver.patch
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13-rc3gwen
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages bitlbee depends on:
ii adduser 3.67 Add and remove users and groups
ii debconf 1.4.57 Debian configuration management sy
ii debianutils 2.14.2 Miscellaneous utilities specific t
ii libc6 2.3.5-4 GNU C Library: Shared libraries an
ii libglib2.0-0 2.8.0-1 The GLib library of C routines
ii libgnutls11 1.0.16-13.1 GNU TLS library - runtime library
ii net-tools 1.60-15 The NET-3 networking toolkit
ii netbase 4.21 Basic TCP/IP networking system
ii netkit-inetd 0.10-10.2 The Internet Superserver
ii tcpd 7.6.dbs-8 Wietse Venema's TCP wrapper utilit
bitlbee recommends no packages.
-- debconf information:
* bitlbee/serveport: 6667
diff -uNr archive/bitlbee-last/protocols/jabber/jabber.c bitlbee/protocols/jabber/jabber.c
--- archive/bitlbee-last/protocols/jabber/jabber.c 2004-11-14 22:37:47.000000000 +0100
+++ bitlbee/protocols/jabber/jabber.c 2005-08-24 09:47:25.000000000 +0200
@@ -565,16 +565,27 @@
{
struct aim_user *user;
int port = -1, ssl = 0;
+ char *server = NULL, *s;
if (!gjc || gjc->state != JCONN_STATE_OFF)
return;
user = GJ_GC(gjc)->user;
if (*user->proto_opt[0]) {
- if (isdigit(user->proto_opt[0][0]))
- sscanf(user->proto_opt[0], "%d", &port);
+ /* If there's a dot, assume there's a hostname in the beginning */
+ if (strchr(user->proto_opt[0], '.')) {
+ server = g_strdup(user->proto_opt[0]);
+ if ((s = strchr(server, ':')))
+ *s = 0;
+ }
+
+ /* After the hostname, there can be a port number */
+ s = strchr(user->proto_opt[0], ':');
+ if (s && isdigit(s[1]))
+ sscanf(s + 1, "%d", &port);
- if (strstr(user->proto_opt[0], "ssl"))
+ /* And if there's the string ssl, the user wants an SSL-connection */
+ if (strstr(user->proto_opt[0], ":ssl") || g_strcasecmp(user->proto_opt[0], "ssl") == 0)
ssl = 1;
}
@@ -582,6 +593,9 @@
port = DEFAULT_PORT;
else if (port == -1 && ssl)
port = DEFAULT_PORT_SSL;
+
+ if (server == NULL)
+ server = g_strdup(gjc->user->server);
gjc->parser = XML_ParserCreate(NULL);
XML_SetUserData(gjc->parser, (void *)gjc);
@@ -589,14 +603,16 @@
XML_SetCharacterDataHandler(gjc->parser, charData);
if (ssl) {
- if ((gjc->ssl = ssl_connect(gjc->user->server, port, gjab_connected_ssl, GJ_GC(gjc))))
+ if ((gjc->ssl = ssl_connect(server, port, gjab_connected_ssl, GJ_GC(gjc))))
gjc->fd = ssl_getfd(gjc->ssl);
else
gjc->fd = -1;
} else {
- gjc->fd = proxy_connect(gjc->user->server, port, gjab_connected, GJ_GC(gjc));
+ gjc->fd = proxy_connect(server, port, gjab_connected, GJ_GC(gjc));
}
+ g_free(server);
+
if (!user->gc || (gjc->fd < 0)) {
STATE_EVT(JCONN_STATE_OFF)
return;