diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-11-18 13:24:20 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-11-18 13:24:20 -0600 |
commit | 9777d244eca1e935589058851ed2b011ce3287d0 (patch) | |
tree | 3fd37d0cef8a33757bf9e4c7ac137548aa788617 /src | |
parent | e1e44e772a789313956e819711d45f8d0d6f0d8b (diff) | |
download | ofono-9777d244eca1e935589058851ed2b011ce3287d0.tar.bz2 |
Report AttachInProgress Error
If one tries to activate a context and we're currently attaching or
detaching from GPRS, report the AttachInProgress error
Diffstat (limited to 'src')
-rw-r--r-- | src/dbus.c | 7 | ||||
-rw-r--r-- | src/gprs.c | 2 | ||||
-rw-r--r-- | src/ofono.h | 1 |
3 files changed, 9 insertions, 1 deletions
@@ -322,6 +322,13 @@ DBusMessage *__ofono_error_not_attached(DBusMessage *msg) "GPRS is not attached"); } +DBusMessage *__ofono_error_attach_in_progress(DBusMessage *msg) +{ + return g_dbus_create_error(msg, + DBUS_GSM_ERROR_INTERFACE ".AttachInProgress", + "GPRS Attach is in progress"); +} + void __ofono_dbus_pending_reply(DBusMessage **msg, DBusMessage *reply) { DBusConnection *conn = ofono_dbus_get_connection(); @@ -607,7 +607,7 @@ static DBusMessage *pri_set_property(DBusConnection *conn, return __ofono_error_not_attached(msg); if (ctx->gprs->flags & GPRS_FLAG_ATTACHING) - return __ofono_error_busy(msg); + return __ofono_error_attach_in_progress(msg); if (gc == NULL || gc->driver->activate_primary == NULL || gc->driver->deactivate_primary == NULL) diff --git a/src/ofono.h b/src/ofono.h index 037c4039..266ed880 100644 --- a/src/ofono.h +++ b/src/ofono.h @@ -52,6 +52,7 @@ DBusMessage *__ofono_error_timed_out(DBusMessage *msg); DBusMessage *__ofono_error_sim_not_ready(DBusMessage *msg); DBusMessage *__ofono_error_in_use(DBusMessage *msg); DBusMessage *__ofono_error_not_attached(DBusMessage *msg); +DBusMessage *__ofono_error_attach_in_progress(DBusMessage *msg); void __ofono_dbus_pending_reply(DBusMessage **msg, DBusMessage *reply); |