[asterisk-commits] bweschke: branch bweschke/originate_w_jabber r95257 - /team/bweschke/originat...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 28 13:49:10 CST 2007


Author: bweschke
Date: Fri Dec 28 13:49:09 2007
New Revision: 95257

URL: http://svn.digium.com/view/asterisk?view=rev&rev=95257
Log:
 Bring in the patch from issue #11644 because it does what it is supposed to do.


Modified:
    team/bweschke/originate_w_jabber/res/res_jabber.c

Modified: team/bweschke/originate_w_jabber/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/originate_w_jabber/res/res_jabber.c?view=diff&rev=95257&r1=95256&r2=95257
==============================================================================
--- team/bweschke/originate_w_jabber/res/res_jabber.c (original)
+++ team/bweschke/originate_w_jabber/res/res_jabber.c Fri Dec 28 13:49:09 2007
@@ -68,7 +68,6 @@
 #endif
 
 /*-- Forward declarations */
-static int aji_highest_bit(int number);
 static void aji_buddy_destroy(struct aji_buddy *obj);
 static void aji_client_destroy(struct aji_client *obj);
 static int aji_send_exec(struct ast_channel *chan, void *data);
@@ -334,23 +333,6 @@
 }
 
 /*!
- * \brief Detects the highest bit in a number.
- * \param number  Number you want to have evaluated.
- * \return the highest power of 2 that can go into the number.
- */
-static int aji_highest_bit(int number)
-{
-	int x = sizeof(number) * 8 - 1;
-	if (!number)
-		return 0;
-	for (; x > 0; x--) {
-		if (number & (1 << x))
-			break;
-	}
-	return (1 << x);
-}
-
-/*!
  * \brief Setup the authentication struct
  * \param id iksid 
  * \param pass password
@@ -832,8 +814,8 @@
 	char *s;
 	char *base64;
 
-	if (type == IKS_STREAM_SASL_MD5)
-		return iks_start_sasl(client->p, IKS_SASL_DIGEST_MD5, username, pass);
+	if (!(type && IKS_STREAM_SASL_PLAIN))
+		return IKS_NET_NOTSUPP;
 
 	x = iks_new("auth"); 
 	if (!x) {
@@ -952,7 +934,7 @@
 							ast_log(LOG_ERROR, "Malformed Jabber ID : %s (domain missing?)\n", client->jid->full);
 							break;
 						}
-						features = aji_highest_bit(features);
+
 						ret = aji_start_sasl(client, features, client->jid->user, client->password);
 						if (ret != IKS_OK) {
 							ASTOBJ_UNREF(client, aji_client_destroy);




More information about the asterisk-commits mailing list