Make Operator attribute work when SPN is empty

This commit is contained in:
Denis Kenzior 2009-05-27 14:52:35 -05:00
parent 2c73893d0a
commit ce68c39d0b
1 changed files with 3 additions and 1 deletions

View File

@ -343,8 +343,10 @@ static char *get_operator_display_name(struct ofono_modem *modem)
return name;
}
if (!netreg->spname)
if (!netreg->spname || strlen(netreg->spname) == 0) {
g_strlcpy(name, netreg->current_operator->name, len);
return name;
}
plmn = netreg->current_operator->name;