ofono: do not use context path as network group identifier
authorKalle Valo <kalle.valo@canonical.com>
Fri, 11 Jun 2010 06:12:06 +0000 (09:12 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 11 Jun 2010 06:56:17 +0000 (23:56 -0700)
commit33f67b50ead6154e77579c532618b6a56d3bd9b6
tree4209b0376df7713bf3abded32e8deb3c98eab504
parenta4ca2c5965eb4a11ceab76eb62bf0308016c6f29
ofono: do not use context path as network group identifier

The ofono plugin was using context path as network group identifier
which caused service path to end something like this:

/profile/default/cellular_244053111242822_huawei2_primarycontext1

But the problem here is that with certain modems (like my Huawei E1552)
the path will change every time the modem in replugged. This meant
that a new connman service was created everytime and I had to
enter APN everytime, instead of using the stored service which already
had APN correctly set.

Fix this by using only the last part from path, for example in this
case primarycontext1:

/profile/default/cellular_244053111242822_primarycontext1

Now with huawei modems the service id stays always the same as it should.
plugins/ofono.c