[asterisk-commits] branch group/asterisk-xmpp r29509 - in
/team/group/asterisk-xmpp: configs/ in...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon May 22 13:08:10 MST 2006
Author: mogorman
Date: Mon May 22 15:08:09 2006
New Revision: 29509
URL: http://svn.digium.com/view/asterisk?rev=29509&view=rev
Log:
hmm really ready this time.
Modified:
team/group/asterisk-xmpp/configs/jabber.conf.sample
team/group/asterisk-xmpp/include/asterisk/jabber.h
team/group/asterisk-xmpp/res/res_jabber.c
Modified: team/group/asterisk-xmpp/configs/jabber.conf.sample
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/configs/jabber.conf.sample?rev=29509&r1=29508&r2=29509&view=diff
==============================================================================
--- team/group/asterisk-xmpp/configs/jabber.conf.sample (original)
+++ team/group/asterisk-xmpp/configs/jabber.conf.sample Mon May 22 15:08:09 2006
@@ -1,16 +1,15 @@
[general]
-;debug=yes
-;autoprune=yes
-;autoregister=yes
+;debug=yes ;;Turn on debugging by default.
+;autoprune=yes ;;Auto remove users from buddy list.
+;autoregister=yes ;;Auto register users from buddy list.
-;[asterisk]
-;type=client
-;serverhost=astjab.org
-;host=astjab.org
-;username=asterisk at astjab.org/asterisk
-;secret=blah
-;port=5222
-;usetls=yes
-;usesasl=yes
-;;allowplaintextauth=no
-;buddy=mogorman at astjab.org,2000 at local
+;[asterisk] ;;label
+;type=client ;;Client or Component connection
+;serverhost=astjab.org ;;Route to server for example,
+ ;; talk.google.com
+;username=asterisk at astjab.org/asterisk ;;username with optional roster.
+;secret=blah ;;Password
+;port=5222 ;;Port to use defaults to 5222
+;usetls=yes ;;use tls or not
+;usesasl=yes ;;use sasl or not
+;buddy=mogorman at astjab.org ;;manual addition of buddy to list.
Modified: team/group/asterisk-xmpp/include/asterisk/jabber.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/include/asterisk/jabber.h?rev=29509&r1=29508&r2=29509&view=diff
==============================================================================
--- team/group/asterisk-xmpp/include/asterisk/jabber.h (original)
+++ team/group/asterisk-xmpp/include/asterisk/jabber.h Mon May 22 15:08:09 2006
@@ -91,7 +91,6 @@
ASTOBJ_COMPONENTS(struct aji_client);
char password[160];
char user[160];
- char server[160];
char serverhost[160];
char context[100];
char sid[10]; /* Session ID */
Modified: team/group/asterisk-xmpp/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-xmpp/res/res_jabber.c?rev=29509&r1=29508&r2=29509&view=diff
==============================================================================
--- team/group/asterisk-xmpp/res/res_jabber.c (original)
+++ team/group/asterisk-xmpp/res/res_jabber.c Mon May 22 15:08:09 2006
@@ -185,7 +185,7 @@
if(!node)
node = pak->from->full;
if(!version)
- version = "non supplied.";
+ version = "none supplied.";
while(list) {
if(!strcasecmp(list->node, node)) {
res = list->versions;
@@ -453,7 +453,7 @@
auth = jabber_make_auth(client->jid, client->password, iks_find_attrib(node, "id"));
if (auth) {
iks_insert_attrib(auth, "id", client->mid);
- iks_insert_attrib(auth, "to", client->server);
+ iks_insert_attrib(auth, "to", client->jid->server);
ast_aji_increment_mid(client->mid);
iks_send(client->p, auth);
iks_delete(auth);
@@ -1690,7 +1690,7 @@
{
int connected = 0;
- connected = iks_connect_via(client->p, client->serverhost, client->port, client->server);
+ connected = iks_connect_via(client->p, client->serverhost, client->port, client->jid->server);
if (connected == IKS_NET_NOCONN) {
ast_log(LOG_ERROR, "JABBER ERROR: No Connection\n");
@@ -1712,7 +1712,7 @@
static int aji_component_initialize(struct aji_client *client)
{
int connected = 1;
- connected = iks_connect_via(client->p, client->server, client->port, client->user);
+ connected = iks_connect_via(client->p, client->jid->server, client->port, client->user);
if (connected == IKS_NET_NOCONN)
ast_log(LOG_ERROR, "JABBER ERROR: No Connection");
if (connected == IKS_NET_NODNS)
@@ -1940,8 +1940,6 @@
ast_verbose("var->value: %s\n",var->value);
if (!strcasecmp(var->name, "username"))
ast_copy_string(client->user, var->value, sizeof(client->user));
- else if (!strcasecmp(var->name, "host"))
- ast_copy_string(client->server, var->value, sizeof(client->server));
else if (!strcasecmp(var->name, "serverhost"))
ast_copy_string(client->serverhost, var->value, sizeof(client->serverhost));
else if (!strcasecmp(var->name, "secret"))
@@ -2003,6 +2001,8 @@
iks_filter_add_rule(client->f, aji_ditems_handler, client, IKS_RULE_NS, "http://jabber.org/protocol/disco#items", IKS_RULE_DONE);
iks_filter_add_rule(client->f, aji_register_query_handler, client, IKS_RULE_SUBTYPE, IKS_TYPE_GET, IKS_RULE_NS, "jabber:iq:register", IKS_RULE_DONE);
iks_filter_add_rule(client->f, aji_register_approve_handler, client, IKS_RULE_SUBTYPE, IKS_TYPE_SET, IKS_RULE_NS, "jabber:iq:register", IKS_RULE_DONE);
+ } else {
+ iks_filter_add_rule(client->f, aji_client_info_handler, client, IKS_RULE_NS, "http://jabber.org/protocol/disco#info", IKS_RULE_DONE);
}
if (!strchr(client->user, '/') && client->component == AJI_CLIENT) {
resource = NULL;
More information about the asterisk-commits
mailing list