From: =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis <frederic.danis@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH] emulator: fix +CLIP in case of withheld call
Date: Wed, 20 Apr 2011 22:24:41 +0200 [thread overview]
Message-ID: <1303331081-5047-1-git-send-email-frederic.danis@linux.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 824 bytes --]
---
src/emulator.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/emulator.c b/src/emulator.c
index 9b4647b..9055909 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;
}
}
--
1.7.1
next reply other threads:[~2011-04-20 20:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 20:24 =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis [this message]
2011-04-21 21:24 ` [PATCH] emulator: fix +CLIP in case of withheld call Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1303331081-5047-1-git-send-email-frederic.danis@linux.intel.com \
--to=frederic.danis@linux.intel.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox