diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-28 19:30:39 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-28 19:30:39 +0000 |
commit | a1394d0f421aebcff7cbc5e3621b8df2b1b5f064 (patch) | |
tree | d61b09b6855e1124fd2cf7b0a0df901ff5589927 /res/res_jabber.c | |
parent | ceb24db1d23e3fd3c85c5aad6acb4bc665c21d8b (diff) |
Fix building with -Wdeclaration-after-statement
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72490 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_jabber.c')
-rw-r--r-- | res/res_jabber.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/res/res_jabber.c b/res/res_jabber.c index 850a62985..78ff7d9a6 100644 --- a/res/res_jabber.c +++ b/res/res_jabber.c @@ -518,6 +518,9 @@ static void aji_log_hook(void *data, const char *xmpp, size_t size, int is_incom 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 @@ static int aji_start_sasl(iksparser *prs, enum ikssasltype type, char *username, } 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); |