From: Dmitriy Paliy <dmitriy.paliy@nokia.com>
To: linux-bluetooth@vger.kernel.org
Cc: Dmitriy Paliy <dmitriy.paliy@nokia.com>
Subject: [PATCH] Add ERROR code response to ATD in maemo6 telephony
Date: Fri, 1 Apr 2011 15:05:54 +0300 [thread overview]
Message-ID: <1301659554-2773-1-git-send-email-dmitriy.paliy@nokia.com> (raw)
ERROR code response is added to ATD command in maemo6 telephony driver
based on HFP 1.5 specification, page 68:
"Standard error indication code. It shall be issued on detection of any
syntax, format or procedure error condition."
---
audio/telephony-maemo6.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index 0cef7dd..be2fb87 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -618,7 +618,7 @@ static void remove_pending(DBusPendingCall *call)
pending_req_finalize(req);
}
-static void last_number_call_reply(DBusPendingCall *call, void *user_data)
+static void create_call_reply(DBusPendingCall *call, void *user_data)
{
DBusError err;
DBusMessage *reply;
@@ -648,7 +648,7 @@ void telephony_last_dialed_number_req(void *telephony_device)
ret = send_method_call(CSD_CALL_BUS_NAME, CSD_CALL_PATH,
CSD_CALL_INTERFACE, "CreateFromLast",
- last_number_call_reply, telephony_device,
+ create_call_reply, telephony_device,
DBUS_TYPE_INVALID);
if (ret < 0)
telephony_dial_number_rsp(telephony_device,
@@ -687,16 +687,12 @@ void telephony_dial_number_req(void *telephony_device, const char *number)
ret = send_method_call(CSD_CALL_BUS_NAME, CSD_CALL_PATH,
CSD_CALL_INTERFACE, "Create",
- NULL, NULL,
+ create_call_reply, telephony_device,
DBUS_TYPE_STRING, &number,
DBUS_TYPE_INVALID);
- if (ret < 0) {
+ if (ret < 0)
telephony_dial_number_rsp(telephony_device,
CME_ERROR_AG_FAILURE);
- return;
- }
-
- telephony_dial_number_rsp(telephony_device, CME_ERROR_NONE);
}
void telephony_transmit_dtmf_req(void *telephony_device, char tone)
--
1.7.1
next reply other threads:[~2011-04-01 12:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 12:05 Dmitriy Paliy [this message]
2011-04-01 13:48 ` [PATCH] Add ERROR code response to ATD in maemo6 telephony Johan Hedberg
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=1301659554-2773-1-git-send-email-dmitriy.paliy@nokia.com \
--to=dmitriy.paliy@nokia.com \
--cc=linux-bluetooth@vger.kernel.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