Commit Graph

73 Commits

Author SHA1 Message Date
Denis Kenzior 70e1d47baa Add context-id allocation / deallocation code
This also disables attempts to use multiple active contexts.  The code
isn't setup to do this yet.
2009-12-09 21:02:47 -06:00
Denis Kenzior 8495e047e6 Refactor: use unsigned ints for cids 2009-12-09 21:02:47 -06:00
Denis Kenzior 58c8a33adf Fix: Reset active contexts if gprs is detached
When we lose network registration or are forcefully detached from the
network we must reset all active contexts to inactive.
2009-12-08 17:19:40 -06:00
Denis Kenzior 2ac70c7f27 Reset context settings when context is deactivated 2009-12-08 17:19:23 -06:00
Denis Kenzior a1ea26cd9d Style: Remove extra blank line 2009-12-08 17:11:35 -06:00
Denis Kenzior 55572b6e69 Style: Use unsigned int instead of unsigned 2009-12-01 12:42:23 -06:00
Marcel Holtmann 231aca4a69 Get rid of the pointless checks before g_free in GPRS engine 2009-11-24 00:27:22 +01:00
Marcel Holtmann 5253d82057 Add support bringing GPRS interfaces up and down as needed 2009-11-24 00:26:09 +01:00
Martin Xu 040d660d41 Emit settings signal before active signal 2009-11-23 09:07:57 +01:00
Denis Kenzior 9777d244ec Report AttachInProgress Error
If one tries to activate a context and we're currently attaching or
detaching from GPRS, report the AttachInProgress error
2009-11-18 13:24:20 -06:00
Denis Kenzior e1e44e772a Refactor: Send NotAttached error
If one tries to activate the context and we're currently not attached to
GPRS, report a NotAttached error instead of a failure
2009-11-18 13:23:13 -06:00
Denis Kenzior 41050ef7b1 Implement CGREG query
Some modems do not properly send CGREG notifications when the context is
attached / detached.  We manually query the registration state of GPRS
to make sure that if the modem is indeed attached, the state is
reflected properly
2009-11-18 10:34:23 -06:00
Denis Kenzior d111fc3cee Refactor: Move functions up to avoid declaration 2009-11-18 10:34:00 -06:00
Denis Kenzior ec7f95de7e Fix: Again, uncross the wires 2009-11-18 10:33:09 -06:00
Denis Kenzior acb4e127c6 Fix: Uncross the wires 2009-11-18 10:00:04 -06:00
Denis Kenzior 9b4e898702 Support Settings property of PrimaryContext 2009-11-17 18:55:32 -06:00
Martin Xu 26413141be Add ofono_gprs_context_get_modem 2009-11-17 15:56:31 -06:00
Denis Kenzior e75fef59f2 Fix: Load GPRS settings before finding netreg
GPRS Settings should be loaded before we try to find netreg atom and
potentially try to make the attach/detach decisions.
2009-11-05 10:25:59 -06:00
Denis Kenzior ac5f67c46d Add ability to restore GPRS contexts from settings 2009-11-02 16:02:09 -06:00
Denis Kenzior 8d7f5245b4 Save GPRS context settings 2009-11-02 16:02:09 -06:00
Denis Kenzior 1ff069be5a Add Basic save/restore code for GPRS setting 2009-11-02 16:02:09 -06:00
Denis Kenzior 3c702b4d99 Limit the number of contexts that we manage 2009-11-02 16:02:09 -06:00
Denis Kenzior 708f7481b0 Update CreateContext API 2009-11-02 16:02:09 -06:00
Denis Kenzior 1f73c18257 Add utility to convert strings to context type 2009-11-02 16:02:09 -06:00
Denis Kenzior bf8e486f02 Fix: Default to type internet 2009-11-02 16:02:09 -06:00
Denis Kenzior 26804de94b Add checking for valid APN format 2009-10-30 15:54:32 -05:00
Denis Kenzior fd6d9f9fc7 Fix: Don't pass ofono_network_operator structures 2009-10-29 15:28:26 -05:00
Denis Kenzior 25ef3f8b18 Fix: Obscure crash when GPRS is not supported 2009-10-27 12:39:20 -05:00
Denis Kenzior 30609627bf Fix: Properly unregister context on exit 2009-10-27 12:39:09 -05:00
Denis Kenzior fa8eb23d3f Fix: Use driver_attached instead of attached 2009-10-26 18:30:41 -05:00
Denis Kenzior e63ea23557 Make netreg_update based on CREG, not CGREG 2009-10-26 17:26:19 -05:00
Denis Kenzior 4f85ee5c97 Simplify logic in netreg_update 2009-10-26 17:25:52 -05:00
Denis Kenzior 078e2bdc2a Fix unused variable warning 2009-10-26 17:00:35 -05:00
Denis Kenzior 4552b0c26a Don't cause an infinite loop 2009-10-26 17:00:18 -05:00
Denis Kenzior ae1192ba99 Get rid of the AFTER_ROAMING stuff 2009-10-26 16:58:24 -05:00
Denis Kenzior c7a113dbd2 Ignore gprs status when not attached/attaching 2009-10-26 16:57:21 -05:00
Denis Kenzior d5fe6dce96 Update attached status when gprs status changes 2009-10-26 16:56:52 -05:00
Denis Kenzior bc72cca91b Fix: notify_attached was only used when detached
The standard only specifies that the context might have been detached by
the network / mobile equipment.  Not attached.
2009-10-26 16:55:03 -05:00
Denis Kenzior e0603f0c68 Add a master function for updating attached state 2009-10-26 16:54:18 -05:00
Denis Kenzior fe974ea4f2 Fixup initialization logic 2009-10-26 16:20:36 -05:00
Denis Kenzior ca4f75ca0b Fix: Initialize registration statuses 2009-10-26 16:19:54 -05:00
Andrzej Zaborowski 939be2adc2 Refactor: Make GPRS use information from netreg 2009-10-26 13:34:41 -05:00
Andrzej Zaborowski 53414483d3 Fix: Don't attach if searching
Don't ask driver to attach GPRS if modem is already searching for an
operator.
2009-10-26 13:32:26 -05:00
Andrzej Zaborowski 4779ed055a Fix interpretation of new GPRS registration status signal. 2009-10-26 13:29:41 -05:00
Denis Kenzior 50ae504bc6 Fix: Fix segfault from improperly initialized data 2009-10-24 12:39:31 -05:00
Andrzej Zaborowski 87f4e3890d Just return success when value already set in SetProperty. 2009-10-24 10:27:06 -05:00
Denis Kenzior 722204ae6c Fix: Connect up gprs and gprs_context 2009-10-23 17:05:56 -05:00
Denis Kenzior 7faa34d235 Fix: Typo in property name 2009-10-23 17:05:56 -05:00
Denis Kenzior 14c116be36 Remove unused code and make compiler happy 2009-10-23 17:05:56 -05:00
Denis Kenzior a3b736afe5 Add implementation of GPRS context atom 2009-10-23 17:05:56 -05:00