[asterisk-commits] qwell: trunk r72490 - /trunk/res/res_jabber.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 28 14:30:40 CDT 2007


Author: qwell
Date: Thu Jun 28 14:30:39 2007
New Revision: 72490

URL: http://svn.digium.com/view/asterisk?view=rev&rev=72490
Log:
Fix building with -Wdeclaration-after-statement

Modified:
    trunk/res/res_jabber.c

Modified: trunk/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_jabber.c?view=diff&rev=72490&r1=72489&r2=72490
==============================================================================
--- trunk/res/res_jabber.c (original)
+++ trunk/res/res_jabber.c Thu Jun 28 14:30:39 2007
@@ -518,6 +518,9 @@
 static int aji_start_sasl(iksparser *prs, enum ikssasltype type, char *username, char *pass)
 {
 	iks *x = NULL;
+	int len;
+	char *s;
+	char *base64;
 
 	if (type == IKS_STREAM_SASL_MD5)
 		return iks_start_sasl(prs, type, username, pass);
@@ -529,10 +532,10 @@
 	}
 
 	iks_insert_attrib(x, "xmlns", IKS_NS_XMPP_SASL);
-	int len = strlen(username) + strlen(pass) + 3;
+	len = strlen(username) + strlen(pass) + 3;
 	/* XXX Check return values XXX */
-	char *s = ast_malloc(80 + len);
-	char *base64 = ast_malloc(80 + len * 2);
+	s = ast_malloc(80 + len);
+	base64 = ast_malloc(80 + len * 2);
 	iks_insert_attrib(x, "mechanism", "PLAIN");
 	sprintf(s, "%c%s%c%s", 0, username, 0, pass);
 	ast_base64encode(base64, (const unsigned char *) s, len, len * 2);




More information about the asterisk-commits mailing list