Skip to contentSkip to conversation

stemodem: Check for ok in voicecall_initialize.

PATCH Superseded Marit Henriksen 2 participants 2 messages Feb 3, 2011

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stemodem: Check for ok in voicecall_initialize.

From: Marit Henriksen <[email protected]>

---
 drivers/stemodem/voicecall.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/stemodem/voicecall.c +4 -0
index fa078a8..2eaba8c 100644
@@ -522,6 +522,10 @@ static void ste_voicecall_initialized(gboolean ok, GAtResult *result,
 	struct ofono_voicecall *vc = user_data;
 	struct voicecall_data *vd = ofono_voicecall_get_data(vc);
 
+	if (!ok)
+		ofono_error("*ECAV not enabled. "
+				"Do not have proper call handling");
+
 	g_at_chat_register(vd->chat, "*ECAV:", ecav_notify, FALSE, vc, NULL);
 	ofono_voicecall_register(vc);
 }
Signature · 1 line
1.7.1
#1 lore raw

Hi Marit,

Quoted 11 lines · Marit Henriksen

From: Marit Henriksen <[email protected]>

---
 drivers/stemodem/voicecall.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/stemodem/voicecall.c +0 -0
index fa078a8..2eaba8c 100644

drivers/stemodem/voicecall.c static void ste_voicecall_initialized(gboolean ok, GAtResult *result, · line 528

Quoted 7 lines
drivers/stemodem/voicecall.c +4 -0
@@ -522,6 +522,10 @@ static void ste_voicecall_initialized(gboolean ok, GAtResult *result,
 	struct ofono_voicecall *vc = user_data;
 	struct voicecall_data *vd = ofono_voicecall_get_data(vc);
 
+	if (!ok)
+		ofono_error("*ECAV not enabled. "
+				"Do not have proper call handling");
+

Why do you still register the atom here? Should you also call ofono_voicecall_remove() and return here?

drivers/stemodem/voicecall.c static void ste_voicecall_initialized(gboolean ok, GAtResult *result, · line 531

Quoted 3 lines
drivers/stemodem/voicecall.c +0 -0
 	g_at_chat_register(vd->chat, "*ECAV:", ecav_notify, FALSE, vc, NULL);
 	ofono_voicecall_register(vc);
 }

Regards,
-Denis