Fix: Process CBS settings even if no EFcbmid

If EFcbmid is not present, corrupt or empty the code that bootstraps the
CBS settings is never called.
This commit is contained in:
Denis Kenzior 2010-01-20 21:35:33 -06:00
parent 03fd69ace9
commit 675ef623c7
1 changed files with 4 additions and 3 deletions

View File

@ -832,10 +832,10 @@ static void sim_cbmid_read_cb(int ok, int length, int record,
GSList *contents = NULL;
if (!ok)
return;
goto done;
if ((length % 2) == 1 || length < 2)
return;
goto done;
cbs->efcbmid_length = length;
@ -855,7 +855,7 @@ static void sim_cbmid_read_cb(int ok, int length, int record,
}
if (contents == NULL)
return;
goto done;
cbs->efcbmid_contents = g_slist_reverse(contents);
@ -863,6 +863,7 @@ static void sim_cbmid_read_cb(int ok, int length, int record,
ofono_debug("Got cbmid: %s", str);
g_free(str);
done:
cbs_got_file_contents(cbs);
}