diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-01-07 13:25:32 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-01-07 13:25:32 -0600 |
commit | 0ed5c700109c4a824c40965fb53a53be2a9e264d (patch) | |
tree | 882b5b6bc8d926a20d23be23fc8f34d2090a801b | |
parent | cdfe6dd3427809548ef2aefe7fe26c341f5d851d (diff) | |
download | ofono-0ed5c700109c4a824c40965fb53a53be2a9e264d.tar.bz2 |
Fix: Fail if no driver or id range set
-rw-r--r-- | src/gprs.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -650,6 +650,11 @@ static DBusMessage *pri_set_property(DBusConnection *conn, if (g_str_equal(property, "Active")) { struct ofono_gprs_context *gc = ctx->gprs->context_driver; + if (gc == NULL || gc->driver->activate_primary == NULL || + gc->driver->deactivate_primary == NULL || + ctx->gprs->cid_map == NULL) + return __ofono_error_not_implemented(msg); + if (gc->pending) return __ofono_error_busy(msg); @@ -667,10 +672,6 @@ static DBusMessage *pri_set_property(DBusConnection *conn, if (ctx->gprs->flags & GPRS_FLAG_ATTACHING) return __ofono_error_attach_in_progress(msg); - if (gc == NULL || gc->driver->activate_primary == NULL || - gc->driver->deactivate_primary == NULL) - return __ofono_error_not_implemented(msg); - if (value) { ctx->context.cid = gprs_cid_alloc(ctx->gprs); |