Skip to contentSkip to conversation

Fix +CGEV: parsing

PATCH In review Andrzej Zaborowski 2 participants 2 messages Nov 10, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix +CGEV: parsing

---
 drivers/atmodem/gprs.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/atmodem/gprs.c +4 -2
index 242086c..7aaa51a 100644
@@ -192,14 +192,16 @@ static void cgev_notify(GAtResult *result, gpointer user_data)
 	GAtResultIter iter;
 	const char *event;
 
+	g_at_result_iter_init(&iter, result);
+
 	if (!g_at_result_iter_next(&iter, "+CGEV:"))
 		return;
 
 	if (!g_at_result_iter_next_unquoted_string(&iter, &event))
 		return;
 
-	if (g_str_has_prefix(event, "NW DETACH ") ||
-			g_str_has_prefix(event, "ME DETACH ")) {
+	if (g_str_equal(event, "NW DETACH") ||
+			g_str_equal(event, "ME DETACH")) {
 		ofono_gprs_detached_notify(gprs);
 		return;
 	}
Signature · 1 line
1.6.1