Commit Graph

59 Commits

Author SHA1 Message Date
Denis Kenzior 85448aac8c gatchat: get_channel should return one from GAtIO 2010-04-28 17:27:34 -05:00
Denis Kenzior 19115e0a15 gatchat: Channel is now setup by GAtIO 2010-04-28 17:27:34 -05:00
Denis Kenzior 033b576593 gatchat: Better re-entrancy handling 2010-04-28 17:27:34 -05:00
Denis Kenzior f9b2e5cf5a gatchat: Only set debug on IO if we have it 2010-04-28 17:27:33 -05:00
Denis Kenzior 3aa1faddef gatchat: Replace shutdown by suspend/resume
Shutdown was actually pointless and according to Marcel he only had it
in mind for PPP useage.
2010-04-28 17:27:33 -05:00
Denis Kenzior 7b8f4f5dc8 gatchat: port gatchat to use gatio 2010-04-28 17:27:33 -05:00
Denis Kenzior f09ce13ad7 gatchat: Remove g_at_chat_set_syntax
Never used and too unsafe in its current form
2010-04-28 17:27:32 -05:00
Marcel Holtmann 8f05535bb2 Add offset parameter to ring_buffer_write_ptr() function 2010-04-24 18:59:44 +02:00
Marcel Holtmann a977ecf260 Remove various GDestroyNotify function casting 2010-04-12 17:48:20 -07:00
Marcel Holtmann 2dab6bc3a6 The user data pointer variable should be called user_data 2010-04-11 17:42:40 +02:00
Marcel Holtmann 764501482e Fix some cases where g_try_new should be used 2010-04-02 19:20:53 -07:00
Denis Kenzior 1905d4deda Fix: Make CONNECT <baud> responses work 2010-03-24 19:42:16 -05:00
Gustavo F. Padovan ed4cf758b7 Remove dead assignments at gatchat 2010-02-03 00:12:49 -06:00
Denis Kenzior 0767f1dbd8 Fix: Check if the command is still pending 2010-02-01 17:59:28 -06:00
Denis Kenzior e6ccc74504 Style: No need for the extra line 2010-02-01 17:59:28 -06:00
Marcel Holtmann 4f3b99e189 Use 3 read attempts when in non-blocking mode 2010-01-28 22:24:04 +01:00
Marcel Holtmann c9a37e4a9a Add new constructor for fully blocking operation 2010-01-28 22:05:44 +01:00
Denis Kenzior fb918d39ba Fix: Take care of uninitialized variable condition
In some (impossible) circumstances rbytes and err might be used
uninitialized.  Here we make a check that a read was actually attempted
before checking those variables.
2010-01-28 14:38:59 -06:00
Marcel Holtmann 839988cfa3 Limit the number of continues read attempts 2010-01-28 12:41:31 +01:00
Denis Kenzior aebda1ac94 Refactor: Reorder argument order
The order of arguments was a bit confusing, reorder them to make more
logical sense.
2010-01-20 14:21:22 -06:00
Zhenhua Zhang 7145edd3a4 Add gatutil.c to share common APIs with GAtServer
Add gatutil.c/h gat.h and move shared typedef and APIs into it.
So that they can be shared by GAtServer and GAtChat.
2010-01-20 14:13:57 -06:00
Denis Kenzior e8d18946b9 Fix: One more fix for disconnect detection
In situations where lots of data is generated by the remote side (e.g.
phonebook is being read) we can get our ring buffer filled up.  In this
case setting rbytes to zero first and then breaking out of the loop
leads to an erroneous disconnect detection.  The fix is to move setting
of rbytes after we know we still have some space.
2010-01-15 10:24:01 -06:00
Denis Kenzior aec5b8a44f Fix: Make remote disconnect detection work 2010-01-14 10:26:12 -06:00
Denis Kenzior 687c84a1ff Style: Various issues 2010-01-12 17:54:37 -06:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Marcel Holtmann 2876e1aa64 Unifiy all GAtChat error labels 2009-12-24 07:06:23 -08:00
Denis Kenzior 1d98c226b5 Add g_at_chat_unregister_all function 2009-12-02 19:10:08 -06:00
Denis Kenzior cf98ebb653 Add: g_at_chat_cancel_all function
This will cancel all commands currently queued.
2009-12-02 19:10:04 -06:00
Denis Kenzior 9b5b1057e4 Fix: Sometimes it is possible to cancel first cmd
Commands on the head of the queue can be canceled if none of its bytes
have actually been written to the modem.  This is tracked by
cmd_bytes_written variable.
2009-12-02 15:27:26 -06:00
Denis Kenzior 0d022d3057 Fix: Don't allow cancelation of command id 0 2009-12-02 15:26:56 -06:00
Denis Kenzior 48a61b6d06 Fix: Retry the wakeup command until the modem OKs
The calypso is weird where it doesn't actually wakeup on the first try,
we need to bang its head a few times until it responds
2009-11-26 07:44:25 -06:00
Yang Gu d9acd12fae Framework to support non-standard terminator 2009-11-24 18:06:20 +01:00
Denis Kenzior d6f5ac3767 Fix: Make sure we don't gobble up unsolicited 2009-11-23 19:56:24 -06:00
Denis Kenzior feda620c94 Fix: Stop crashing when unrefing chat in callback 2009-10-16 17:46:28 -05:00
Denis Kenzior 9aa2182261 Add ability to retrieve the atchat IOChannel 2009-10-15 16:15:16 -05:00
Marcel Holtmann cfbc902287 Add support for switching to a different GAtSyntax at runtime 2009-10-02 12:29:02 +02:00
Denis Kenzior 6a78e402d3 Replace g_at_chat_new_from_tty with g_at_tty_open 2009-10-01 16:43:19 -05:00
Zhenhua Zhang 78244d6190 Unref GIOChannel in g_at_chat_new_from_tty 2009-09-24 10:01:07 -07:00
Marcel Holtmann c4a5f3a483 Fix trailing whitespace 2009-09-18 13:56:03 -07:00
Denis Kenzior a1e67482bb Simplify cleanup logic 2009-09-18 13:33:22 -05:00
Denis Kenzior 2ee7f4a6f8 Fix g_at_chat_unref from command callback
The resources were being used after being freed in this case
2009-09-07 23:21:50 -05:00
Denis Kenzior c9d704955c Add PDU listing support 2009-08-31 23:03:35 -05:00
Denis Kenzior 5e4ff5ced9 Ensure g_timeout_add source can be removed safely 2009-08-07 16:20:59 -05:00
Denis Kenzior 88b327cff5 Cleanup the debug support patch 2009-08-06 16:38:46 -05:00
Andres Salomon d66fd48bf9 gatchat: add debugging infrastructure
This patch adds debugging support to GAtChat (specifically of what's going
across the serial line).  Callbacks can be set via g_at_chat_set_debugging,
and that callback is called after any channel reads or writes.
2009-08-06 16:38:45 -05:00
Denis Kenzior 1418c2aec1 Make overflow code a bit better 2009-08-06 16:38:45 -05:00
Denis Kenzior 83820c88b2 Refactor GAtChat to accept user-provided parsers
Intended for really broken modems.  A default 27.007 compliant
parser is provided.
2009-08-06 16:38:39 -05:00
Denis Kenzior 239ab461f7 Fix refcounting in GAtChat 2009-08-06 15:42:23 -05:00
Denis Kenzior d4536b3d2b Fix a crash with unsolicited notifications
When a line comes in from the modem, we check against prefixes
in outstanding commands and unsolicited notifications.  If the
outstanding command has not yet been sent (cmd_bytes_written == 0),
we still check it resulting in access violation.
2009-07-21 14:43:33 -05:00
Denis Kenzior 86864c819c Add extra_pdu_crlf quirk 2009-07-15 15:51:33 -05:00