All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] Replace parse_clcc by at_util_parse_clcc in atmodem voicecall
@ 2009-11-12 16:32 Zhenhua Zhang
  2009-11-12 17:25 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Zhenhua Zhang @ 2009-11-12 16:32 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2406 bytes --]

Replace parse_clcc by at_util_parse_clcc in atmodem voicecall.
---
 drivers/atmodem/voicecall.c |   59
+-----------------------------------------
 1 files changed, 2 insertions(+), 57 deletions(-)

diff --git a/drivers/atmodem/voicecall.c b/drivers/atmodem/voicecall.c
index 9ed3696..9dae1c8 100644
--- a/drivers/atmodem/voicecall.c
+++ b/drivers/atmodem/voicecall.c
@@ -119,61 +119,6 @@ static struct ofono_call *create_call(struct
voicecall_data *d, int type,
 	return call;
 }
 
-static GSList *parse_clcc(GAtResult *result)
-{
-	GAtResultIter iter;
-	GSList *l = NULL;
-	int id, dir, status, type;
-	struct ofono_call *call;
-
-	g_at_result_iter_init(&iter, result);
-
-	while (g_at_result_iter_next(&iter, "+CLCC:")) {
-		const char *str = "";
-		int number_type = 129;
-
-		if (!g_at_result_iter_next_number(&iter, &id))
-			continue;
-
-		if (!g_at_result_iter_next_number(&iter, &dir))
-			continue;
-
-		if (!g_at_result_iter_next_number(&iter, &status))
-			continue;
-
-		if (!g_at_result_iter_next_number(&iter, &type))
-			continue;
-
-		if (!g_at_result_iter_skip_next(&iter))
-			continue;
-
-		if (g_at_result_iter_next_string(&iter, &str))
-			g_at_result_iter_next_number(&iter, &number_type);
-
-		call = g_try_new0(struct ofono_call, 1);
-
-		if (!call)
-			break;
-
-		call->id = id;
-		call->direction = dir;
-		call->status = status;
-		call->type = type;
-		strncpy(call->phone_number.number, str,
-				OFONO_MAX_PHONE_NUMBER_LENGTH);
-		call->phone_number.type = number_type;
-
-		if (strlen(call->phone_number.number) > 0)
-			call->clip_validity = 0;
-		else
-			call->clip_validity = 2;
-
-		l = g_slist_insert_sorted(l, call, at_util_call_compare);
-	}
-
-	return l;
-}
-
 static void clcc_poll_cb(gboolean ok, GAtResult *result, gpointer
user_data)
 {
 	struct ofono_voicecall *vc = user_data;
@@ -191,7 +136,7 @@ static void clcc_poll_cb(gboolean ok, GAtResult
*result, gpointer user_data)
 		return;
 	}
 
-	calls = parse_clcc(result);
+	calls = at_util_parse_clcc(result);
 
 	n = calls;
 	o = vd->calls;
@@ -482,7 +427,7 @@ static void clcc_cb(gboolean ok, GAtResult *result,
gpointer user_data)
 		goto out;
 	}
 
-	calls = parse_clcc(result);
+	calls = at_util_parse_clcc(result);
 
 	if (calls == NULL) {
 		CALLBACK_WITH_FAILURE(cb, 0, NULL, cbd->data);
-- 
1.6.2.5




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/3] Replace parse_clcc by at_util_parse_clcc in atmodem voicecall
  2009-11-12 16:32 [PATCH 3/3] Replace parse_clcc by at_util_parse_clcc in atmodem voicecall Zhenhua Zhang
@ 2009-11-12 17:25 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2009-11-12 17:25 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 72 bytes --]

Hi Zhenhua,

Patch has been applied. Thanks.

Regards,
-Denis



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-12 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-12 16:32 [PATCH 3/3] Replace parse_clcc by at_util_parse_clcc in atmodem voicecall Zhenhua Zhang
2009-11-12 17:25 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.