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);
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);