[svn-commits] mogorman: branch mogorman/asterisk-jabber r41042 - /team/mogorman/asterisk-ja...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Aug 24 23:56:10 MST 2006


Author: mogorman
Date: Fri Aug 25 01:56:10 2006
New Revision: 41042

URL: http://svn.digium.com/view/asterisk?rev=41042&view=rev
Log:
woohoo we can route based on who they called

Modified:
    team/mogorman/asterisk-jabber/channels/chan_gtalk.c

Modified: team/mogorman/asterisk-jabber/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-jabber/channels/chan_gtalk.c?rev=41042&r1=41041&r2=41042&view=diff
==============================================================================
--- team/mogorman/asterisk-jabber/channels/chan_gtalk.c (original)
+++ team/mogorman/asterisk-jabber/channels/chan_gtalk.c Fri Aug 25 01:56:10 2006
@@ -824,6 +824,7 @@
 	struct aji_resource *resources = NULL;
 	struct aji_buddy *buddy;
 	char idroster[200];
+	char *data, *exten;
 
 	if (option_debug)
 		ast_log(LOG_DEBUG, "The client is %s for alloc\n", client->name);
@@ -867,7 +868,13 @@
 		free(tmp);
 		return NULL;
 	}
-	ast_copy_string(tmp->exten, "s", sizeof(tmp->exten));
+
+	if(strchr(tmp->us, '/')) {
+		data = ast_strdupa((char *) tmp->us);
+		exten = strsep(&data, "/");
+		free(data);
+	}
+	ast_copy_string(tmp->exten, exten, sizeof(tmp->exten));
 	ast_mutex_init(&tmp->lock);
 	ast_mutex_lock(&gtalklock);
 	tmp->next = client->p;



More information about the svn-commits mailing list