Merge lp://qastaging/~awe/phablet-extras/ofono-lp1204683 into lp://qastaging/phablet-extras/ofono

Proposed by Tony Espy
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 53
Merged at revision: 51
Proposed branch: lp://qastaging/~awe/phablet-extras/ofono-lp1204683
Merge into: lp://qastaging/phablet-extras/ofono
Diff against target: 66 lines (+32/-8)
2 files modified
debian/changelog (+7/-0)
plugins/provision.c (+25/-8)
To merge this branch: bzr merge lp://qastaging/~awe/phablet-extras/ofono-lp1204683
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+178137@code.qastaging.launchpad.net

Commit message

[provision] If multiple APNs are found for a SPN/mmc/mnc search, only provision the first.

Description of the change

This fix causes the provisioning plugin to only create a data context for the first APN found in mbpi.

This is a temporary solution to prevent network-manager from creating and trying multiple contexts when only one of them is needed.

Note, this might break auto-provisioning for some people if the first APN found is not the correct APN, however the true fix is to switch to a better source of APNs.

To test, you need first need to ensure that your operator has more than one APN defined in /usr/share/mobile-broadband-provider-info/serviceproviders.xml. If not, then edit the file manually and add one or more APNs for your operator. Ensure that these data contexts have been created using the ofono script 'list-contexts'.

Now, stop ofono and NM, edit the gprs settings file ( /var/lib/ofono/<IMSI>/gprs ) and remove all the contexts. Install the ofono produced from this merge, and reboot. Verify that only one APN/context has been created.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

30 + if ( ap_count > 1)

Mind removing extra space between '(' and 'ap_count'?

Also, would be nice to change the DBG message "Found %d APs" to also say we're just getting the first AP.

42 + if (i == 0)
43 + memcpy(*settings + i, ap,
44 + sizeof(struct ofono_gprs_provision_data));

Mind adding a comment in there before 'i == 0' explaining why we're only copying the first provisioning data? (small one, as you explained on a previous code block).

Would also be nice to remove the extra DGB for the other APNs, as it would confuse folks trying to debug a possible APN issue (you could remove the DBG lines and only get that for the one you copied over to 'settings').

review: Needs Fixing
53. By Tony Espy

[provision] Address review comments.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Looks good, and tested with maguro, worked as expected.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches