* [PATCH] core: Always return success to a no-op
@ 2011-01-20 10:55 Aki Niemi
2011-01-20 11:23 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Aki Niemi @ 2011-01-20 10:55 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 996 bytes --]
A SetProperty that doesn't actually change the Online property's state
when no change to that state is pending, should not fail. It should
always succeed regardless of the current modem state.
---
src/modem.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/modem.c b/src/modem.c
index f587766..e966a6e 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -580,15 +580,15 @@ static DBusMessage *set_property_online(struct ofono_modem *modem,
if (modem->pending != NULL)
return __ofono_error_busy(msg);
+ if (modem->online == online)
+ return dbus_message_new_method_return(msg);
+
if (driver->set_online == NULL)
return __ofono_error_not_implemented(msg);
if (modem->modem_state < MODEM_STATE_OFFLINE)
return __ofono_error_not_available(msg);
- if (modem->online == online)
- return dbus_message_new_method_return(msg);
-
modem->pending = dbus_message_ref(msg);
driver->set_online(modem, online,
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] core: Always return success to a no-op
2011-01-20 10:55 [PATCH] core: Always return success to a no-op Aki Niemi
@ 2011-01-20 11:23 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2011-01-20 11:23 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 363 bytes --]
Hi Aki,
> A SetProperty that doesn't actually change the Online property's state
> when no change to that state is pending, should not fail. It should
> always succeed regardless of the current modem state.
> ---
> src/modem.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
patch has been applied. Thanks.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-20 11:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-20 10:55 [PATCH] core: Always return success to a no-op Aki Niemi
2011-01-20 11:23 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.