[asterisk-commits] tilghman: branch 1.4 r72554 - /branches/1.4/res/res_jabber.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 28 23:43:16 CDT 2007


Author: tilghman
Date: Thu Jun 28 23:43:15 2007
New Revision: 72554

URL: http://svn.digium.com/view/asterisk?view=rev&rev=72554
Log:
Fix 1.4 breakage

Modified:
    branches/1.4/res/res_jabber.c

Modified: branches/1.4/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_jabber.c?view=diff&rev=72554&r1=72553&r2=72554
==============================================================================
--- branches/1.4/res/res_jabber.c (original)
+++ branches/1.4/res/res_jabber.c Thu Jun 28 23:43:15 2007
@@ -575,11 +575,11 @@
 									iks *x = NULL;
 									x = iks_new("auth");
 									if (x) {
-										iks_insert_attrib(x, "xmlns", IKS_NS_XMPP_SASL);
 										int len = strlen(client->jid->user) + strlen(client->password) + 3;
 										/* XXX Check return values XXX */
 										char *s = ast_malloc(80 + len);
 										char *base64 = ast_malloc(80 + len * 2);
+										iks_insert_attrib(x, "xmlns", IKS_NS_XMPP_SASL);
 										iks_insert_attrib(x, "mechanism", "PLAIN");
 										sprintf(s, "%c%s%c%s", 0, client->jid->user, 0, client->password);
 										ast_base64encode(base64, (const unsigned char *) s, len, len * 2);
@@ -744,8 +744,8 @@
 
 	buddy = ASTOBJ_CONTAINER_FIND(&client->buddies, pak->from->partial);
 	if (!buddy) {
+		iks *iq = NULL, *query = NULL, *error = NULL, *notacceptable = NULL;
 		ast_verbose("Someone.... %s tried to register but they aren't allowed\n", pak->from->partial);
-		iks *iq = NULL, *query = NULL, *error = NULL, *notacceptable = NULL;
 		iq = iks_new("iq");
 		query = iks_new("query");
 		error = iks_new("error");




More information about the asterisk-commits mailing list