Commit Graph

20 Commits

Author SHA1 Message Date
Denis Kenzior 4cbb33fcbd Fix: Use the proper enum type 2010-03-03 13:07:24 -06:00
Zhenhua Zhang 72851607e1 Add command echo back if ATE=1 2010-03-03 13:01:34 -06:00
Denis Kenzior 7be80ef131 Fix: Simplify write-again logic 2010-02-26 16:17:57 -06:00
Denis Kenzior 988fed5951 Fix: Don't allocate buffers if we don't need to 2010-02-26 16:16:46 -06:00
Zhenhua Zhang c6f4d051b2 Add write server response into non-blocking IO
Write server response into non-blocking GIOChannel when we have
G_IO_OUT signal.
2010-02-26 16:10:19 -06:00
Zhenhua Zhang 534898f164 Add write buffer queue for non-blocking write
The head of the queue is the data to be written, the tail is the
free buffer to cache data into.

If the tail of queue is full, allocate a new free buffer and
append it at the tail.
2010-02-26 16:07:33 -06:00
Zhenhua Zhang e96293d5bb Add define for read and write buffer size 2010-02-26 16:04:52 -06:00
Zhenhua Zhang 79b480166c Do not trigger user disconnect at g_at_shutdown
Similar to gatchat, introduce read_watcher_destroy_notify and do
not trigger user disconnect at g_at_shutdown. Delay destroy of
gatserver until read_watcher is destroyed.
2010-02-26 16:04:36 -06:00
Zhenhua Zhang c4073fca00 Rename server_io to channel
To make it consistent with GAtChat.
2010-02-10 16:41:31 -06:00
Zhenhua Zhang c5f962cb18 Replace sprintf with snprintf 2010-02-10 16:41:31 -06:00
Zhenhua Zhang d80bba564e Rename buf to read_buf in GAtServer
Because we may introduce write_buf for sever response buffer.
2010-02-10 16:41:31 -06:00
Zhenhua Zhang 2a58101807 Fix change state immediately when meet the slash
According to V.250 spec section 5.2.4 Repeating a command line, if
the prefix "A/" or "a/" is received, we should execute the last
command immediately. No need to meet \r.
2010-02-02 11:31:23 -06:00
Denis Kenzior a4b681f02f Fix: Remove unused label 2010-02-01 18:02:40 -06:00
Denis Kenzior 321bb02ee3 Fix: Skip whitespace in AT command line 2010-02-01 17:59:29 -06:00
Denis Kenzior 57d62a0b42 Refactor: Use more flexible parser framework 2010-02-01 17:59:29 -06:00
Denis Kenzior 263044721e Fix: Don't set variables to NULL/0
These were already set to 0 by g_try_new0
2010-02-01 17:59:28 -06:00
Denis Kenzior b6961b0d68 Refactor: Support max_read attempts like GAtChat 2010-02-01 17:59:28 -06:00
Denis Kenzior 1514997ff1 Fix: Use a function instead of a table 2010-02-01 17:59:28 -06:00
Denis Kenzior cd1845da6b Fix: Make compile 2010-02-01 17:59:28 -06:00
Zhenhua Zhang df7b1b30dc Add GAtServer basic parsing support
It's the basic skeleton of GAtServer, including new/shutdown, ref/
unref, received_data/parse_buffer and set_discuss/set_debug.

GAtServer is to emulate the server side of AT conversation. It
complies with V.250 and 27.007 spec to accept AT command like
ATV1, ATE0 and extended command like AT+CLCC. Upper layer could
create customize server to expose TTY, tcp or unix socket to
client side application.
2010-02-01 17:59:27 -06:00