* [PATCH 1/2] Remove unneeded code to disable the modem on hfp
@ 2010-01-28 13:32 Gustavo F. Padovan
2010-01-28 13:32 ` [PATCH 2/2] Handle the error path from service_level_connection Gustavo F. Padovan
2010-01-28 16:49 ` [PATCH 1/2] Remove unneeded code to disable the modem on hfp Denis Kenzior
0 siblings, 2 replies; 6+ messages in thread
From: Gustavo F. Padovan @ 2010-01-28 13:32 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 560 bytes --]
ofono_modem_remove() already disables the modem.
---
plugins/hfp.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/plugins/hfp.c b/plugins/hfp.c
index 867b194..2d0faa8 100644
--- a/plugins/hfp.c
+++ b/plugins/hfp.c
@@ -397,9 +397,6 @@ static DBusMessage *hfp_agent_release(DBusConnection *conn, DBusMessage *msg, vo
{
struct ofono_modem *modem = data;
- if (ofono_modem_get_powered(modem))
- hfp_disable(modem);
-
ofono_modem_remove(modem);
return dbus_message_new_method_return(msg);
--
1.6.4.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] Handle the error path from service_level_connection
2010-01-28 13:32 [PATCH 1/2] Remove unneeded code to disable the modem on hfp Gustavo F. Padovan
@ 2010-01-28 13:32 ` Gustavo F. Padovan
2010-01-28 16:50 ` Denis Kenzior
2010-01-28 16:49 ` [PATCH 1/2] Remove unneeded code to disable the modem on hfp Denis Kenzior
1 sibling, 1 reply; 6+ messages in thread
From: Gustavo F. Padovan @ 2010-01-28 13:32 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 941 bytes --]
---
plugins/hfp.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/plugins/hfp.c b/plugins/hfp.c
index 2d0faa8..d9d3bda 100644
--- a/plugins/hfp.c
+++ b/plugins/hfp.c
@@ -377,7 +377,7 @@ static int service_level_connection(struct ofono_modem *modem, int fd)
static DBusMessage *hfp_agent_new_connection(DBusConnection *conn, DBusMessage *msg, void *data)
{
- int fd;
+ int fd, err;
struct ofono_modem *modem = data;
struct hfp_data *hfp_data = ofono_modem_get_data(modem);
@@ -385,7 +385,9 @@ static DBusMessage *hfp_agent_new_connection(DBusConnection *conn, DBusMessage *
DBUS_TYPE_INVALID))
return __ofono_error_invalid_args(msg);
- service_level_connection(modem, fd);
+ err = service_level_connection(modem, fd);
+ if (err < 0 && err != -EINPROGRESS)
+ return __ofono_error_failed(msg);
hfp_data->slc_msg = msg;
dbus_message_ref(msg);
--
1.6.4.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] Remove unneeded code to disable the modem on hfp
2010-01-28 13:32 [PATCH 1/2] Remove unneeded code to disable the modem on hfp Gustavo F. Padovan
2010-01-28 13:32 ` [PATCH 2/2] Handle the error path from service_level_connection Gustavo F. Padovan
@ 2010-01-28 16:49 ` Denis Kenzior
1 sibling, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2010-01-28 16:49 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 215 bytes --]
Hi Gustavo,
> ofono_modem_remove() already disables the modem.
> ---
> plugins/hfp.c | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Handle the error path from service_level_connection
2010-01-28 13:32 ` [PATCH 2/2] Handle the error path from service_level_connection Gustavo F. Padovan
@ 2010-01-28 16:50 ` Denis Kenzior
2010-01-28 17:12 ` [PATCH] " Gustavo F. Padovan
0 siblings, 1 reply; 6+ messages in thread
From: Denis Kenzior @ 2010-01-28 16:50 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
Hi Gustavo,
> ---
> plugins/hfp.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
Patch looks good, but doesn't apply:
Applying: Handle the error path from service_level_connection
error: patch failed: plugins/hfp.c:377
error: plugins/hfp.c: patch does not apply
Patch failed at 0001 Handle the error path from service_level_connection
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Regards,
-Denis
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Handle the error path from service_level_connection
2010-01-28 16:50 ` Denis Kenzior
@ 2010-01-28 17:12 ` Gustavo F. Padovan
2010-01-28 17:18 ` Denis Kenzior
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo F. Padovan @ 2010-01-28 17:12 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 932 bytes --]
---
plugins/hfp.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/plugins/hfp.c b/plugins/hfp.c
index 5b2cdae..0e2e359 100644
--- a/plugins/hfp.c
+++ b/plugins/hfp.c
@@ -367,7 +367,7 @@ static int service_level_connection(struct ofono_modem *modem, int fd)
static DBusMessage *hfp_agent_new_connection(DBusConnection *conn,
DBusMessage *msg, void *data)
{
- int fd;
+ int fd, err;
struct ofono_modem *modem = data;
struct hfp_data *hfp_data = ofono_modem_get_data(modem);
@@ -375,7 +375,9 @@ static DBusMessage *hfp_agent_new_connection(DBusConnection *conn,
DBUS_TYPE_INVALID))
return __ofono_error_invalid_args(msg);
- service_level_connection(modem, fd);
+ err = service_level_connection(modem, fd);
+ if (err < 0 && err != -EINPROGRESS)
+ return __ofono_error_failed(msg);
hfp_data->slc_msg = msg;
dbus_message_ref(msg);
--
1.6.4.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Handle the error path from service_level_connection
2010-01-28 17:12 ` [PATCH] " Gustavo F. Padovan
@ 2010-01-28 17:18 ` Denis Kenzior
0 siblings, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2010-01-28 17:18 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 166 bytes --]
Hi Gustavo,
> ---
> plugins/hfp.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-28 17:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28 13:32 [PATCH 1/2] Remove unneeded code to disable the modem on hfp Gustavo F. Padovan
2010-01-28 13:32 ` [PATCH 2/2] Handle the error path from service_level_connection Gustavo F. Padovan
2010-01-28 16:50 ` Denis Kenzior
2010-01-28 17:12 ` [PATCH] " Gustavo F. Padovan
2010-01-28 17:18 ` Denis Kenzior
2010-01-28 16:49 ` [PATCH 1/2] Remove unneeded code to disable the modem on hfp Denis Kenzior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox