Commit Graph

223 Commits

Author SHA1 Message Date
Marcel Holtmann 543db63f19 gprs: Use ofono_bool_t instead of gboolean 2012-06-17 22:23:23 -07:00
Lucas De Marchi e0d6f9f0ce Do not set signature and reply in GDBus tables
Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.
2012-05-20 02:47:57 -07:00
Lucas De Marchi b3489f2ee8 Convert GDBus methods to use macro helpers
With these macro helpers we can separate in/out arguments and use their
own vector.
2012-05-20 02:47:57 -07:00
Henrique Dante de Almeida 924ee02ff7 Constify GDBus signal tables
Constify signal tables with the following command:

    find . -name '*.[ch]' -exec \
             sed -i 's/\(GDBusSignalTable .* =\)/const \1/g' {} \;
2012-05-20 02:47:56 -07:00
Henrique Dante de Almeida 63bbdebdf2 Constify GDBus method tables
Constify method tables with the following command:

find . -name '*.[ch]' -exec \
             sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
2012-05-20 02:47:56 -07:00
Denis Kenzior 878573b831 gprs: Use __ofono_atom_find 2012-01-18 12:36:37 -06:00
Denis Kenzior b5d6d835fa gprs: Trivial code reflow 2012-01-18 10:33:56 -06:00
Oleg Zhurakivskyy 9ebdfe29db gprs: Use sim SPN watch API 2012-01-18 10:26:03 -06:00
Oleg Zhurakivskyy 60976f1357 gprs: Minor whitespace and style fixes 2011-12-28 16:07:48 -06:00
Marcel Holtmann 7e6afe37bf core: Update copyright information 2011-10-10 13:39:42 -07:00
Denis Kenzior 51d0ac1ce4 gprs: Allow NULL context names while provisioning 2011-09-08 23:50:19 -05:00
Denis Kenzior ddbacc2dda gprs: Experimental fix for twitchy Huawei firmware 2011-08-18 14:23:04 -05:00
Denis Kenzior ea07cbfa1b gprs: Unify logic inside registration_status_cb
And delay reseting the ATTACHING flag until we had a chance to query the
CGREG status.
2011-06-02 15:56:18 -05:00
Gustavo F. Padovan fe4b81d69a gprs: remove set but not used var 2011-05-20 15:04:59 -05:00
Denis Kenzior 543b54a34e gprs: Make sure to clean up interfaces
When going down, it is sometimes possible for us not to ifconfig down
the interface or reset the MMS context IPv4 address propertly
2011-05-11 13:29:33 -05:00
Denis Kenzior 4714d8199a gprs: Mark context inactive on removal 2011-05-11 12:11:23 -05:00
Denis Kenzior 623183d996 gprs: Fix valgrind error
This fixes an invalid access condition for the case where the
gprs atom is destroyed before context atoms are.
2011-05-11 12:11:23 -05:00
Denis Kenzior de0b882acf gprs: emit Active changed for contexts being removed 2011-05-11 12:11:23 -05:00
Denis Kenzior 5646ecaf35 gprs: Add additional debug statements 2011-05-11 12:11:23 -05:00
Mika Liljeberg 0eedf42921 core: remove redundant code 2011-03-30 12:33:54 -05:00
Mika Liljeberg b52c06210c gprs: fix memory leak 2011-03-24 13:22:46 -05:00
Denis Kenzior 88402f02b2 gprs: Core changes for IPv6 support 2011-03-15 17:14:23 -05:00
Denis Kenzior 3d71a15c74 gprs: Move settings structure
Move the settings structure from pri_context to ofono_gprs_context in
preparation for new IPv6 support APIs.
2011-03-15 17:11:58 -05:00
Denis Kenzior 91a9425f21 gprs: Add support for dual stack contexts 2011-03-15 17:11:58 -05:00
Denis Kenzior ae096831e5 gprs: Also reset active in release_context 2011-03-15 17:11:58 -05:00
Mika Liljeberg 35e1f55c9a gprs: factor out common code 2011-03-15 17:11:58 -05:00
Denis Kenzior 566c60a402 gprs: Fixup error path
When we try to register the GPRS D-Bus interface and fail for some
reason, calling gprs_unregister is not really kosher since much of the
initialization has not yet been done.  Call an intermediate function
instead.
2011-02-08 21:55:42 -06:00
Jukka Saunamaki 7243af46fa gprs,gprs-provision: add SPN to provisioning API 2011-02-08 21:48:54 -06:00
Denis Kenzior e0d777a655 core: free GError objects returned by glib 2011-02-08 16:48:52 -06:00
Denis Kenzior 40926f1951 gprs: Be a bit more paranoid when loading settings 2011-02-06 23:47:16 -06:00
Denis Kenzior dc3019031d gprs: Refactor gprs provisioning 2011-01-26 14:55:59 -06:00
Denis Kenzior a02387d0b5 gprs: Put back the id if context creation fails 2011-01-26 14:55:59 -06:00
Denis Kenzior 04ce2bd8cc gprs: write out MessageCenter and MessageProxy
These values were not written out to settings
2011-01-26 14:55:59 -06:00
Jukka Saunamaki 7a5f06dd6a gprs: add gprs context provisioning 2011-01-26 14:55:58 -06:00
Pekka Pessi a847f2ac0f gprs: Make gprs atom offline-safe
Allow use of GPRS atom both in online and offline (post_sim) states.

The GPRS now considers the removal of the netreg atom as implicit detach
and registration change to NOT_REGISTERED.
2011-01-20 09:58:52 -06:00
Denis Kenzior f8b2ea9ebe gprs: Move packet bearer stuff into gprs.c 2011-01-20 09:49:36 -06:00
Tomasz Gregorek 33aaeb9dff gprs: mark context driver as not used when removing active context 2011-01-20 13:31:29 +01:00
Rémi Denis-Courmont 8ccbc9e515 gprs: Core support for packet switched bearer reporting 2011-01-20 12:09:18 +01:00
Rémi Denis-Courmont 6082339040 gprs: avoid useless loop iteration 2011-01-10 16:31:32 -08:00
Lasse.Kunnasluoto@tieto.com 557454453d gprs: Fixing mem leak 2011-01-10 14:57:32 -06:00
Antti Paila 185bb79b1b gprs: Fix for gprs context conversion 2010-12-02 07:58:17 -06:00
Lucas De Marchi b210838e87 core: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)

// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@

- !E
+ E == NULL
// </smpl>
2010-11-29 13:27:15 -06:00
Rémi Denis-Courmont e7c4442c69 core: Remove stray newlines in messages sent to log 2010-11-26 13:50:15 -06:00
Jeevaka Badrappan 2d0cb92155 src: coding style fixes - rule M6 2010-11-22 05:07:52 -06:00
Pekka Pessi 32b333059b gprs: NULL-safe ofono_gprs_context_remove()
Check for NULL in one place.
2010-11-08 13:03:16 -06:00
Denis Kenzior bbe6eb6d4e gprs-context: Replace TYPE_INVALID with TYPE_ANY 2010-10-27 12:39:46 -05:00
Marcel Holtmann 99bd7d0399 gprs: Use common function for default name of default Internet context 2010-10-27 18:14:50 +02:00
Pekka Pessi de96428ca2 gprs-context: add IMS connection type 2010-10-27 16:57:57 +02:00
Marcel Holtmann 4e72af9b19 gprs: Add host route to the configured MMS proxy 2010-10-27 16:09:27 +02:00
Marcel Holtmann 534d1ccec6 gprs: Set IP address for GPRS contexts of type MMS 2010-10-27 15:25:25 +02:00
Marcel Holtmann 87cd9f57b3 gprs: Add support for exposing proxy information for MMS context 2010-10-27 15:09:33 +02:00
Marcel Holtmann c409dacbc8 gprs: Add support for selecting GPRS context drivers based on types 2010-10-27 14:43:32 +02:00
Marcel Holtmann 8ff5d6d6a9 gprs: Add flag to track usage of GPRS context drivers 2010-10-27 13:56:12 +02:00
Marcel Holtmann c7a5210be6 gprs: Extract GPRS context assignment into separate function 2010-10-27 11:53:37 +02:00
Marcel Holtmann b3d18d5115 gprs: Add support for setting GPRS context type 2010-10-27 11:34:54 +02:00
Marcel Holtmann 6cb86931e3 gprs: Make GPRS context type a public enum 2010-10-27 11:28:52 +02:00
Marcel Holtmann 0df5a60a0c gprs: Load stored MMS Proxy and MMSC settings 2010-10-27 00:51:51 +02:00
Marcel Holtmann 20f3a3adb2 gprs: Use better default name for context creation 2010-10-26 23:19:54 +02:00
Marcel Holtmann 768d02a881 gprs: Add support for storing MMS Proxy and MMSC settings 2010-10-26 23:14:58 +02:00
Marcel Holtmann 483663eeed gprs: Assign GPRS atom to GPRS context atom
If the GPRS atom is not assigned to the GPRS context atom, then possible
network triggered activation crashes.
2010-10-26 14:03:47 +02:00
Denis Kenzior ee4879d196 gprs: Return busy if ops are potentially colliding 2010-10-25 16:32:49 -05:00
Denis Kenzior 180f765ebe gprs: Implement DeactivateAll() 2010-10-25 16:32:49 -05:00
Denis Kenzior d168c35b99 gprs: Support multiple active contexts 2010-10-25 14:45:12 -05:00
Marcel Holtmann 3342af770a gprs: Handle failure of GPRS context atom drivers
The GRPS context atom drivers can return an error from their probe
callbacks. In that case gc->driver is NULL and will cause a crash
when trying to activate a context. So check that there is actually
a driver attached to that GPRS context.
2010-10-24 17:14:16 +02:00
Jeevaka Badrappan 4196182770 Fix multi-line comment style issues 2010-09-21 21:16:01 -05:00
Mika Liljeberg 1e139eb1ce gprs: add Suspended property 2010-09-10 10:51:53 -05:00
Pekka Pessi 4aa442d36f gprs: add debug info 2010-08-26 10:38:14 -05:00
Marcel Holtmann 7838503458 gprs: Default value for RoamingAllowed should be FALSE 2010-08-20 11:22:47 +02:00
Marcel Holtmann 335ec6f3ea gprs: Use "Internet" for default PDP context name 2010-08-19 22:36:18 +02:00
Denis Kenzior 18d8584adb gprs: Automatically add a context if none defined 2010-08-19 15:10:30 -05:00
Denis Kenzior 256e01c8c4 gprs: Add support for GetContexts 2010-08-19 14:20:06 -05:00
Denis Kenzior a9a54c0933 gprs: Tweak context object path naming
And support loading of legacy context names
2010-08-19 14:20:06 -05:00
Denis Kenzior 473e34db66 gprs: Break out writing of gprs context settings 2010-08-19 14:20:06 -05:00
Denis Kenzior 323874790b gprs: Add ContextRemoved signal 2010-08-19 14:20:06 -05:00
Denis Kenzior fb4aa43a5d gprs: Emit the ContextAdded signal 2010-08-19 14:20:06 -05:00
Denis Kenzior d1a2875a7e gprs: minor style fix 2010-08-19 14:20:06 -05:00
Denis Kenzior 62b598f704 gprs: Break out context properties append function 2010-08-19 14:20:06 -05:00
Denis Kenzior 4f57fef81b gprs: Get rid of PrimaryContexts property 2010-08-19 14:20:06 -05:00
Denis Kenzior 8f0796ff4f gprs: Update CreateContext to AddContext 2010-08-19 14:20:05 -05:00
Denis Kenzior b73ebe3c83 gprs: Update GPRS related DBus interface names 2010-08-19 14:20:05 -05:00
Denis Kenzior 06f56000ff gprs: Update Attached when Auto-Attached succeded 2010-08-18 20:56:00 -05:00
Denis Kenzior d6f81ef17a gprs: Fix up some attach/detach logic issues
Parts of it are related to Meego bug 5193, namely that we don't properly
signal the Attached status when powering down.

Another part of the fix is that we automatically detach in case our
conditions are not fulfilled if the modem attaches automatically (e.g.
Auto-Attach is enabled)
2010-08-13 18:17:04 -05:00
Zhenhua Zhang 6556eda51c gprs: Fix release cid in gprs_deactive_for_remove
Similiar to pri_deactive_callback, we should release the context id in
gprs_deactive_for_remove() as well.
2010-08-09 09:07:30 -05:00
Denis Kenzior a3b694672d gprs: Minor style fixes 2010-07-19 13:51:00 -05:00
Denis Kenzior d4cae8dd56 gprs: Add Protocol property with IPv6/IPv4 2010-07-19 13:50:37 -05:00
Denis Kenzior f3e0e466c7 gprs: Fix to attachment race condition
Sometimes we get unsolicited attachment status before our query
finishes.  If the client is fast enough they can attempt to attach
and get the AttachInProgress error
2010-06-25 14:19:08 -05:00
Marcel Holtmann 9a72d2566d Move data connection manager interface constants into common include 2010-06-09 20:38:50 -07:00
Denis Kenzior 7972f844c7 Refactor: Simplify the internal GPRS API
We no longer expose lac/ci/tech attributes obtained from CGREG
(some modems, like ISI, do not even report them for GPRS separately).
Simplify the internal gprs driver api to only report the registration
status (e.g. home, roaming, searching, not registered, etc)
2010-03-26 23:00:28 -05:00
Denis Kenzior 88994bbe81 Refactor: Get rid of DCM properties
Be conformant with the API changes from the previous commit
2010-03-26 23:00:28 -05:00
Denis Kenzior ea771ec186 Fix: Tweak gprs attach logic
We use driver_attached to track whether the driver is attached /
attaching.  Unfortunately we only set it when set_attached succeeds.
Instead we should set it right away when calling set_attached, so we
cover pending attaches as well.
2010-02-08 15:33:17 -06:00
Denis Kenzior d11505f751 Fix: Add recheck flag to gprs
When a powered is toggled quickly, we ignore the second request.  This
flag tells us that we should recheck what the attach status should be
once the current operation finishes
2010-02-08 15:32:04 -06:00
Denis Kenzior 87ca1b0c8f Fix: Don't use ofono_debug directly in the core
Use DBG macro which is integrated with the new debug framework.
2010-02-08 11:54:03 -06:00
Denis Kenzior 20db731484 Make primary context ids persistent 2010-01-07 14:43:21 -06:00
Denis Kenzior bf209425e5 Use idmap to allocate primary context ids 2010-01-07 14:07:52 -06:00
Denis Kenzior 0ed5c70010 Fix: Fail if no driver or id range set 2010-01-07 13:25:32 -06:00
Denis Kenzior cdfe6dd342 Use the new from_range idmap constructor 2010-01-07 13:25:10 -06:00
Denis Kenzior 6051d0bdde Refactor: Use idmap to allocate CIDs 2010-01-07 13:01:12 -06:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Marcel Holtmann 0b359e89db Use error label instead of err or err_out 2009-12-24 07:09:09 -08:00
Denis Kenzior 955e6a61ee Style: Fix a few more occurences of if/else
See Linux coding style document for details
2009-12-17 21:45:39 -06:00