Commit Graph

90 Commits

Author SHA1 Message Date
Marcel Holtmann 3472aa67a6 gatchat: Reword the fall through cases to avoid compiler warnings 2017-07-11 10:44:15 -07:00
Guillaume Zajac 2bf8bb9d45 gatserver: Add NULL check to avoid crash
Dundee is not waiting to receive the NO CARRIER notification
to close the IO channel with oFono so that oFono is trying to
send a NO CARRIER although GAtServer is removed.
2012-06-24 17:40:59 -05:00
Marcel Holtmann 21f9da9916 gatchat: Update copyright information 2011-10-10 13:39:25 -07:00
Denis Kenzior 2867bf724d gatserver: Add command finished callbacks 2011-08-15 00:25:27 -05:00
Denis Kenzior 6240b76294 gatserver: Fix not processing after async error
If we send an async error response, all future commands are ignored.
2011-08-14 23:18:05 -05:00
Denis Kenzior 665b2ea99e gatserver: Add sanity check 2011-08-14 23:11:20 -05:00
Denis Kenzior a897ed5e53 gatserver: Fix not sending OK final response 2011-08-14 23:11:03 -05:00
Denis Kenzior 5bd2b86ace gatserver: Refactor IO code
The current GAtServer implementation had nasty corner cases where
multiple commands were issued on the same command line.  The
server_suspend had no effect and we ended up processing the second
command anyway, resulting in interesting side-effects or crashes.

This commit simply discards the rest of the read input if the server
starts processing a command.  Since we do not yet support command
abortion we also discard data that arrives when command is being
processed.
2011-08-14 22:56:45 -05:00
Denis Kenzior 329f2d724b gatserver: fix certain bad behavior
Due to the new GAtIO semantics, the receive function is called
immediately if the receive buffer is not empty.  This caused certain
funny behavior in non-command (e.g. empty, a/) processing.
2011-07-11 15:51:34 -05:00
Olivier Guiter bdb4c8d3db gatserver: add tone and pulse dialing AT commands 2011-03-29 13:54:46 -05:00
Olivier Guiter 6b03d7cdff gatserver: add v250 ATL and ATM commands 2011-03-25 12:37:25 -05:00
Olivier Guiter 155cf8f9c4 gatserver: add AT&F command 2011-03-24 13:27:13 -05:00
Olivier Guiter cc17e8fd8c gatserver: add ATZ command 2011-03-23 15:01:36 -05:00
Denis Kenzior 51d950994d gatserver: Tweak use of g_at_server_suspend/resume 2011-02-28 16:13:56 -06:00
Denis Kenzior 4da1a9318c gatserver: Exit garbage state on HDLC frame end 2011-02-28 16:13:56 -06:00
Denis Kenzior 92404672fc gatserver: Update the internal command parsers
commit 61b30c025d changed the way the
command callbacks are being called (namely the contents of the GAtResult
object).  Most command callbacks were updated, but the internal ones
were forgotten.  This patch fixes this issue.
2011-02-28 16:13:51 -06:00
Frédéric Dalleau 42224e2bbe gatserver: Add function to enable/disable echo 2011-02-23 09:31:07 -06:00
Olivier Guiter 4ae645d7e6 gatserver: Add various ATSx handlers 2011-02-22 09:45:59 -06:00
Denis Kenzior 6eeaacc706 gatserver: Be more const correct 2011-02-16 00:23:44 -06:00
Denis Kenzior a6f910e27c gatserver: Change callback signature
Provide the originating GAtServer to the callback
2011-02-15 15:47:32 -06:00
Denis Kenzior a0cca0a970 gatserver: extend D with GSM/UMTS specifics 2011-02-15 15:47:32 -06:00
Denis Kenzior 61b30c025d gatserver: Don't bother reporting command prefixes
The command line parser knows where the actual command line parameters
begin, so there's no need to make the callback skip the prefix and the
additional separator characters.
2011-02-15 15:47:32 -06:00
Olivier Guiter a1f5a5520a gatserver: Add ATS5 command feature 2011-02-14 09:51:30 -06:00
Olivier Guiter b931e77470 gatserver: ATS6 command handler added 2011-01-18 16:10:23 +01:00
Lucas De Marchi 521071a785 gatchat: 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 12:05:29 -06:00
Zhenhua Zhang e70b1f0abd gatserver: Restore GAtServer disconnect handling
Restore GAtServer disconnect handling when resuming a server session
2010-07-07 11:26:55 -05:00
Zhenhua Zhang 2d219d37f9 gatserver: Don't free twice after user disconnect
It's possible to free gatserver in user disconnect function. So we
should not free it again.
2010-07-06 11:24:44 -05:00
Zhenhua Zhang 1822deba4a gatserver: Check for disconnection when resuming
If the internal GAtIO is no longer valid, treat it as if our channel was
disconnected.
2010-06-17 14:38:53 -05:00
Zhenhua Zhang 047ea0cebb gatserver: Suspend/resume GAtServer with GAtIO
Support g_at_server_suspend and g_at_server_resume operation by using
GAtIO to handle IO related function.
2010-06-17 14:38:23 -05:00
Marcel Holtmann 8f05535bb2 Add offset parameter to ring_buffer_write_ptr() function 2010-04-24 18:59:44 +02:00
Denis Kenzior 6ac0025767 Fix: busy loop in atserver 2010-04-12 22:33:42 -05: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
Andrzej Zaborowski 27d0bc6ccf Fix ampersand commands check
Also remove a trailing tab.
2010-03-31 13:16:13 -05:00
Denis Kenzior b421d0756b Refactor: Simplify V250 setting command functions 2010-03-31 08:38:01 -05:00
Denis Kenzior 2ec19b67a2 Refactor: Simplify gatserver s-register functions 2010-03-31 08:22:40 -05:00
Zhenhua Zhang 86b0fa3194 Fix echo command back even if don't process it 2010-03-31 08:12:55 -05:00
Zhenhua Zhang 5819927a38 Add Repeat last command support 2010-03-31 08:10:33 -05:00
Zhenhua Zhang 1390a63933 Add implementation for ATE and other basic command 2010-03-31 08:10:27 -05:00
Zhenhua Zhang d7eb09cc05 Add implementation for S3, S4, S5 command 2010-03-31 08:10:23 -05:00
Denis Kenzior e63840ba11 Fix: Make sure we still increment read_count 2010-03-30 22:06:12 -05:00
Zhenhua Zhang c288921bab Fix ignore incoming bytes during parsing
Server processes one command line at one time, so ignore the rest
incoming bytes during the command parsing.
2010-03-30 21:59:34 -05:00
Denis Kenzior 250c0c1ef9 Simplify the send_info API 2010-03-30 20:29:10 -05:00
Denis Kenzior 46ebde6965 Fix: Properly handle async final responses 2010-03-30 19:15:55 -05:00
Denis Kenzior 94eeab3688 Fix: We need to preserve the original line 2010-03-30 17:12:43 -05:00
Denis Kenzior 40ca3cb3f5 Fix: Record last received command 2010-03-30 15:25:50 -05:00
Denis Kenzior a2c4c8e7b6 Fix: Send an ERROR on A/ 2010-03-30 15:18:34 -05:00
Denis Kenzior 0448392a91 Refactor: Simplify extended command parsing logic 2010-03-30 14:36:02 -05:00
Denis Kenzior 882b62b640 Refactor: Add a single-line response function 2010-03-30 14:35:29 -05:00