* [PATCH 1/2] Add NO CARRIER response to HFP
@ 2011-04-17 21:29 Dmitriy Paliy
2011-04-17 21:29 ` [PATCH 2/2] Add NO CARRIER reponse to maemo6 telephony driver Dmitriy Paliy
2011-04-18 7:50 ` [PATCH 1/2] Add NO CARRIER response to HFP Johan Hedberg
0 siblings, 2 replies; 3+ messages in thread
From: Dmitriy Paliy @ 2011-04-17 21:29 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Dmitriy Paliy
HFP is updated by NO CARRIER response accordingly to HFP 1.5 p.68.
---
audio/headset.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/audio/headset.c b/audio/headset.c
index c605e9d..2e4f6ca 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -687,14 +687,17 @@ static int telephony_generic_rsp(struct audio_device *device, cme_error_t err)
struct headset *hs = device->headset;
struct headset_slc *slc = hs->slc;
- if (err != CME_ERROR_NONE) {
- if (slc->cme_enabled)
- return headset_send(hs, "\r\n+CME ERROR: %d\r\n", err);
- else
- return headset_send(hs, "\r\nERROR\r\n");
- }
+ if ((err != CME_ERROR_NONE) && slc->cme_enabled)
+ return headset_send(hs, "\r\n+CME ERROR: %d\r\n", err);
- return headset_send(hs, "\r\nOK\r\n");
+ switch (err) {
+ case CME_ERROR_NONE:
+ return headset_send(hs, "\r\nOK\r\n");
+ case CME_ERROR_NO_NETWORK_SERVICE:
+ return headset_send(hs, "\r\nNO CARRIER\r\n");
+ default:
+ return headset_send(hs, "\r\nERROR\r\n");
+ }
}
int telephony_event_reporting_rsp(void *telephony_device, cme_error_t err)
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] Add NO CARRIER reponse to maemo6 telephony driver
2011-04-17 21:29 [PATCH 1/2] Add NO CARRIER response to HFP Dmitriy Paliy
@ 2011-04-17 21:29 ` Dmitriy Paliy
2011-04-18 7:50 ` [PATCH 1/2] Add NO CARRIER response to HFP Johan Hedberg
1 sibling, 0 replies; 3+ messages in thread
From: Dmitriy Paliy @ 2011-04-17 21:29 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Dmitriy Paliy
---
audio/telephony-maemo6.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index be2fb87..b32e8ad 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -630,9 +630,14 @@ static void create_call_reply(DBusPendingCall *call, void *user_data)
if (dbus_set_error_from_message(&err, reply)) {
error("csd replied with an error: %s, %s",
err.name, err.message);
- dbus_error_free(&err);
- telephony_dial_number_rsp(telephony_device,
+ if (g_strcmp0(err.name,
+ "com.nokia.csd.Call.Error.CSInactive") == 0)
+ telephony_dial_number_rsp(telephony_device,
+ CME_ERROR_NO_NETWORK_SERVICE);
+ else
+ telephony_dial_number_rsp(telephony_device,
CME_ERROR_AG_FAILURE);
+ dbus_error_free(&err);
} else
telephony_dial_number_rsp(telephony_device, CME_ERROR_NONE);
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/2] Add NO CARRIER response to HFP
2011-04-17 21:29 [PATCH 1/2] Add NO CARRIER response to HFP Dmitriy Paliy
2011-04-17 21:29 ` [PATCH 2/2] Add NO CARRIER reponse to maemo6 telephony driver Dmitriy Paliy
@ 2011-04-18 7:50 ` Johan Hedberg
1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2011-04-18 7:50 UTC (permalink / raw)
To: Dmitriy Paliy; +Cc: linux-bluetooth, Dmitriy Paliy
Hi Dmitriy,
On Mon, Apr 18, 2011, Dmitriy Paliy wrote:
> HFP is updated by NO CARRIER response accordingly to HFP 1.5 p.68.
> ---
> audio/headset.c | 17 ++++++++++-------
> 1 files changed, 10 insertions(+), 7 deletions(-)
Both patches have been pushed upstream after I fixed your author email
(please fix your git config) and a minor coding style issue in the
second patch.
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-18 7:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-17 21:29 [PATCH 1/2] Add NO CARRIER response to HFP Dmitriy Paliy
2011-04-17 21:29 ` [PATCH 2/2] Add NO CARRIER reponse to maemo6 telephony driver Dmitriy Paliy
2011-04-18 7:50 ` [PATCH 1/2] Add NO CARRIER response to HFP Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox