diff options
author | Frédéric Danis <frederic.danis@linux.intel.com> | 2011-04-20 22:24:41 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-04-21 16:23:08 -0500 |
commit | 7ff32ab8e8b038da5f7a1c6299df57f3f473fef8 (patch) | |
tree | 3fb08452816dcfc0c481daf232261bf6172c4eb9 /src/emulator.c | |
parent | 0b1ac1eaf57703768d9dc15f8e7c38a0c04b86b1 (diff) | |
download | ofono-7ff32ab8e8b038da5f7a1c6299df57f3f473fef8.tar.bz2 |
emulator: fix +CLIP in case of withheld call
Diffstat (limited to 'src/emulator.c')
-rw-r--r-- | src/emulator.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/emulator.c b/src/emulator.c index 9b4647b4..90559096 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -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; } } |