aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2005-02-22 19:37:46 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2005-02-22 19:37:46 +0000
commit5926160fa9b73862af1b5d80e56724cc7eb688a5 (patch)
tree8b169d460e5ee5fa87cfaecd17ca19d2fb16c720 /gtk
parent7dccea9b20c60935a47b4898175e94610db0c80a (diff)
From Alejandro Vaquero:
replace the code that used g_strsplit_set and was broken by me changing it to g_strsplit with something that works svn path=/trunk/; revision=13470
Diffstat (limited to 'gtk')
-rw-r--r--gtk/voip_calls.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/gtk/voip_calls.c b/gtk/voip_calls.c
index 91e54960a3..615c2f51fa 100644
--- a/gtk/voip_calls.c
+++ b/gtk/voip_calls.c
@@ -1556,8 +1556,6 @@ gboolean isSignal(gchar *signal, gchar *signalStr)
*/
void mgcpCallerID(gchar *signalStr, gchar **callerId)
{
- gint i;
- gchar **resultArray;
gchar **arrayStr;
/* if there is no signalStr, just return false */
@@ -1568,24 +1566,12 @@ void mgcpCallerID(gchar *signalStr, gchar **callerId)
if (arrayStr[0] == NULL) return;
/* look for the ci signal */
- resultArray = g_strsplit(arrayStr[0], ",(", 10);
-
- for (i = 0; resultArray[i]; i++) {
- g_strstrip(resultArray[i]);
- if (strcmp(resultArray[i], "ci") == 0){
- if (arrayStr[1] != NULL){
- /* free the previous "From" field of the call, and assign the new */
- g_free(*callerId);
- *callerId = g_strdup(arrayStr[1]);
- }
- g_strfreev(arrayStr);
- g_strfreev(resultArray);
- return;
- }
+ if (g_strrstr(arrayStr[0], "ci(") && (arrayStr[1] != NULL) ) {
+ /* free the previous "From" field of the call, and assign the new */
+ g_free(*callerId);
+ *callerId = g_strdup(arrayStr[1]);
}
-
g_strfreev(arrayStr);
- g_strfreev(resultArray);
return;
}