All pastes #1518540 Raw Edit

Anonymous

public text v1 · immutable
#1518540 ·published 2009-08-04 23:55 UTC
rendered paste body
From ee36b581c515d8a418a90ce3d1a53f49f5fa8610 Mon Sep 17 00:00:00 2001
From: Denis Kenzior <denkenz@gmail.com>
Date: Tue, 4 Aug 2009 18:53:53 -0500
Subject: [PATCH] Fixup atmodem.c for gatchat changes

---
 drivers/atmodem/atmodem.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/atmodem/atmodem.c b/drivers/atmodem/atmodem.c
index fc255b3..bb2ad50 100644
--- a/drivers/atmodem/atmodem.c
+++ b/drivers/atmodem/atmodem.c
@@ -294,11 +294,6 @@ error:
 static void send_init_commands(const char *vendor, GAtChat *parser)
 {
 	if (!strcmp(vendor, "ti_calypso")) {
-		int flags = g_at_chat_get_flags(parser);
-
-		flags |= G_AT_CHAT_FLAG_EXTRA_PDU_CRLF;
-		g_at_chat_set_flags(parser, flags);
-
 		g_at_chat_set_wakeup_command(parser, "\r", 1000, 5000);
 
 		g_at_chat_send(parser, "AT%CUNS=0", NULL, NULL, NULL, NULL);
@@ -329,18 +324,23 @@ static void create_cb(GIOChannel *io, gboolean success, gpointer user)
 	const char *path;
 	const char *target, *driver;
 	const char **modems;
+	GAtSyntax *syntax;
 
 	g_pending = g_slist_remove(g_pending, io);
 
 	if (success == FALSE)
 		goto out;
 
+	syntax = g_at_syntax_new_gsmv1();
+
 	at = g_new0(struct at_data, 1);
 
-	at->parser = g_at_chat_new(io, 0);
+	at->parser = g_at_chat_new(io, syntax);
 
-	if (!at->parser)
+	if (!at->parser) {
+		g_at_syntax_unref(syntax);
 		goto out;
+	}
 
 	ofono_debug("Seting up AT channel");
 
-- 
1.6.0.6