Hi, This patchset tries to fix handling of APNs that are provisioned in ofono ConnectionContexts rather than written there by connman. Previously, the provisioned APNs were only stored in network (element), while service still used the previous/empty APN. After this patch they are stored in service only, to avoid "syncing" problems.
New functions need to be added that ofono plugin can use to set network APN so that it propagates into service too. Plugins currently have no access to service struct so network functions need to take care of this. This looks a bit weird in service set_property() because only connman_network_set_apn() is called, which then stores the APN into service itself too (patch #2). Storing needs to go through network so that APN set by user will be stored in ofono. This follows the existing functionality. Another option would be to add service struct visible for ofono plugin, so that it can store APN into service by itself. Should I do it instead? Henri Bragge (3): network: Add new functions to set/get APN Implement functions to set/get APN in network and service ofono: Use new function to set network APN include/network.h | 2 ++ plugins/ofono.c | 24 +++++++++++++----------- src/connman.h | 3 +++ src/network.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/service.c | 34 ++++++++++++++++++++++++---------- 5 files changed, 86 insertions(+), 21 deletions(-) _______________________________________________ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman