Commit Graph

8 Commits

Author SHA1 Message Date
Dan Williams
6ca5765eb6 core: add chaining helper functions to callback info
Helpful when chaining a number of commands together when you want
to schedule the callback info only after all of them complete.
2010-03-19 10:54:10 -07:00
Dan Williams
5a4a9a6239 core: add refcounts to MMCallbackInfo 2009-12-07 18:39:18 -08:00
Dan Williams
8dd2421e9c core: don't allow double-scheduled callbacks
If the modem becomes invalid (it crashes and resets, for example)
the callback-info's modem_destroyed_cb() function will handle
cleanup.  Buf if the callback-info's callback does more work than
just returning the result (like simple_state_machine) it could
double-schedule the callback.  Don't let that happen.

We need better modem-removal handling, but this fixes a crash for
now.
2009-11-26 13:40:32 -08:00
Alexander Sack
12ac98e9f6 license: add license header to all files and set copyright based on git log 2009-08-06 12:43:51 +02:00
Tambet Ingo
d1d94de6a1 Lots of random fixes:
Rework the MMCallbackInfo callback invocation.
Always use g_error_literal() where it makes sense.
Replace sleep() calls, with timeouts to not block the whole MM.
2008-12-09 15:41:51 +02:00
Tambet Ingo
ac4409e7ce Rewrite serial device communications.
Instead of vague "send something, wait something" the responses are now
analyzed by (overridable) parsers. Makes all the modem implementations much
easier since each caller knows without any code whether the call succeeded
or failed.

Another thing that makes modem code simpler (and the whole thing more robust),
is the queueing of sent commands. Each queued command has a command and a
callback which is quaranteed to get called, even if sending failed.

Define and implement error reporting.
2008-09-11 08:35:32 +03:00
Tambet Ingo
1bb60347b5 Implement reading IMEI, IMSI, manufacturer, model, and version (revision). 2008-09-01 15:45:55 +03:00
Tambet Ingo
cc31458b18 Initial commit. 2008-07-31 09:43:00 +03:00