gprs: Fix invalid string comparison

The default context created when provisioning fails is simply a context
with an empty APN
This commit is contained in:
Denis Kenzior 2019-04-29 19:27:29 -05:00
parent 91253a1ade
commit c56bd74cb1
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}