From c56bd74cb18bc1a6f863501022cf7d80fa767975 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 29 Apr 2019 19:27:29 -0500 Subject: [PATCH] gprs: Fix invalid string comparison The default context created when provisioning fails is simply a context with an empty APN --- src/gprs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gprs.c b/src/gprs.c index 30122695..8b61cc34 100644 --- a/src/gprs.c +++ b/src/gprs.c @@ -1888,7 +1888,7 @@ static struct pri_context *find_usable_context(struct ofono_gprs *gprs, for (l = gprs->contexts; l; l = l->next) { pri_ctx = l->data; - if (pri_ctx->context.apn == NULL) + if (pri_ctx->context.apn[0] == '\0') return pri_ctx; }