Skip to contentSkip to conversation

emulator: fix +CLIP in case of withheld call

PATCH In review Frédéric Danis 2 participants 2 messages Apr 20, 2011 – Apr 21, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 emulator: fix +CLIP in case of withheld call

---
 src/emulator.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
src/emulator.c +10 -2
index 9b4647b..9055909 100644
@@ -261,11 +261,19 @@ static void notify_ring(struct ofono_emulator *em)
 
 	c = find_call_with_status(em, CALL_STATUS_INCOMING);
 
-	if (c && c->clip_validity == CLIP_VALIDITY_VALID) {
+	if (c == NULL)
+		return;
+
+	switch (c->clip_validity) {
+	case CLIP_VALIDITY_VALID:
 		phone = phone_number_to_string(&c->phone_number);
 		sprintf(str, "+CLIP: \"%s\",%d", phone, c->phone_number.type);
-
 		g_at_server_send_unsolicited(em->server, str);
+		break;
+
+	case CLIP_VALIDITY_WITHHELD:
+		g_at_server_send_unsolicited(em->server, "+CLIP: \"\",128");
+		break;
 	}
 }
 
Signature · 1 line
1.7.1
#1 lore raw

Hi Frédéric,

Quoted 4 lines · Frédéric Danis
---
 src/emulator.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis