mirror of git://git.sysmocom.de/ofono
Report AttachInProgress Error
If one tries to activate a context and we're currently attaching or detaching from GPRS, report the AttachInProgress error
This commit is contained in:
parent
e1e44e772a
commit
9777d244ec
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue