Commit Graph

485 Commits

Author SHA1 Message Date
Carlos Pargada 1b10f55f5c gatchat: improve large file downlink data transfer
Fix large file downlink data transfer on IFX modem. Increase buffer size of
ring buffer to support close received Packets from the modem. Set highest
priority for write data on IO device
2011-01-20 12:59:40 +01:00
Marcel Holtmann d70011661c gatchat: The IO setup already ensures no encoding and no buffering 2011-01-20 10:56:21 +01:00
Marcel Holtmann 5d524cac73 gatchat: Small cleanup to make function look simpler 2011-01-20 10:55:31 +01:00
Marcel Holtmann 2f2460f5ae gatchat: Disable encoding for RawIP GIOChannel 2011-01-19 15:28:59 +01:00
Marcel Holtmann 2126700c3e gatchat: Fix setup of GIOChannel from multiplexer DLC 2011-01-19 12:10:10 +01:00
Denis Kenzior 45abba276b gatchat: Turn off buffering of GAtChat IO channels
After commit d83da35370 this was causing
the command queue to never run.
2011-01-18 12:16:19 -06:00
Olivier Guiter b931e77470 gatserver: ATS6 command handler added 2011-01-18 16:10:23 +01:00
Marcel Holtmann d83da35370 gatchat: Use g_io_channel_read_chars and g_io_channel_write_chars 2011-01-18 15:11:31 +01:00
Jeevaka Badrappan 2182336c8b gatchat: M15 coding styles fixes 2011-01-12 08:06:59 -08:00
Vinicius Costa Gomes 2702a2e349 gatchat: fix canceling in progress commands
As g_queue_peek_head() returns the node data field, we have to compare
it against the actual command, not against the pointer to the queue node.
2010-12-07 12:16:20 -06: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
Denis Kenzior 99107c6c9d gatchat: remove write watcher on a disconnect
There's a small probability that we call chat_wakeup_writer
just before the channel disonnects.  When this happens the write
watcher still fires causing a potential crash.
2010-11-23 03:21:22 -06:00
Marcel Holtmann 8c0163bfc0 gatchat: A full support for TUN/TAP pipe and GAtRawIP 2010-10-26 16:57:35 +02:00
Marcel Holtmann a34a8840c9 gatchat: Remove unused write_watch variable of GAtHDLC 2010-10-26 15:16:35 +02:00
Marcel Holtmann 79e23355a4 gatchat: Fix missing return value for g_at_chat_set_slave 2010-10-21 20:34:13 +02:00
Marcel Holtmann 692cf6a6f6 gatchat: Add skeleton for GAtRawIP module
This adds the basic skeleton for a GAtRawIP support. It is only the
skeleton with its intended API. It has no raw IP support yet.
2010-10-21 19:36:18 +02:00
Marcel Holtmann 7492223f49 gatchat: Add support for slave chat instances
This adds support to assign a slave chat instance to an existing chat
instance. The slave chat is now additionally bound by the lifetime of
its master chat instance.

In case the master is cloned, the slave chat instance will also be
cloned as well.

With this it is possible to suspend the master while still have an
active slave for notifications or extra commands.
2010-10-21 18:41:38 +02:00
Marcel Holtmann d0cbae0092 ppp: Fix some coding style and memory leaks 2010-10-21 18:26:50 +02:00
Marcel Holtmann 0caafef6c9 gatchat: Add support for skipping AT+CMUX speed parameter 2010-10-19 18:50:52 +02:00
Denis Kenzior 1e1ddfcf1b gatchat: Fix calling unregister from callbacks
This fixes the issues with SIM hotswap on infineon
2010-10-14 09:42:42 -05:00
Denis Kenzior fd113f7204 gatchat: break out the remove_if logic
And make unregister_group use the new function
2010-10-14 09:42:42 -05:00
Denis Kenzior 7fd86cf94f gatchat: quit early if the group id doesn't match
If the ID of the notify matches but the group id does not match it means
that the unregister is being called with an id that does not belong to
that particular group.  Checking further entries is no longer necessary.
2010-10-14 09:42:42 -05:00
Denis Kenzior 94fb2f23f8 gatsyntax: Fix responses starting with a quote 2010-09-29 05:37:41 -05:00
Marcel Holtmann 3dbfa4a7b4 gatchat: Hook up g_at_mux_set_debug to print debug messages for real 2010-09-26 17:25:27 +09:00
Lucas De Marchi 53f1e826c6 Fix common misspellings in gatchat
Fix common misspellings by using the list available at
http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines

From the list cited above, the substitution script found the following
misspellings:

priviledge->privilege
succeded->succeeded
2010-09-14 16:00:42 +09:00
Denis Kenzior 54c75c47f8 gatchat: Skip string contents in extract_line 2010-08-16 13:11:44 -05:00
Denis Kenzior 5681e9df49 gatchat: Handle embedded \r and \n in responses 2010-08-16 12:44:50 -05:00
Denis Kenzior 0b2beb0068 gatutil: Handle non-printable characters
Signed arithmetic and shifts do not work well...
2010-08-16 11:25:19 -05:00
Denis Kenzior 5f47eca7ed gatchat: Add g_at_chat_clone
This function will clone a chat object, but will create a new group
internally.
2010-08-12 16:06:32 -05:00
Denis Kenzior 2356ebf9ef gatchat: Make GAtChat a facade for struct at_chat
Each GAtChat object is now simply a representation of a set of
outstanding commands and registered unsolicited notification handlers.
This makes it easy to cancel entire groups, e.g. by canceling the
GAtChat object itself rather than forcing the user into tracking all
relevant g_at_chat_register and g_at_chat_send ids.
2010-08-12 16:06:27 -05:00
Zhenhua Zhang a72e092d19 ppp: Add MAX_IPCP_FAILURE to avoid timeout quickly
We use IPCP NAK response to stall the progress of acquiring the client
IP address from DHCP server. So we need to increase the max failure of
NAKs in IPCP handshaking.
2010-07-09 09:53:24 -03:00
Zhenhua Zhang b3c35db955 gatppp: Unset disconnect function when unref PPP
Unset IO disconnect function when we try to destroy GAtPPP instance.
After freeing the instance, the IO disconnect function should not be
invoked.
2010-07-07 11:26:55 -05: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 1badaf741a test-server: Refactor set_raw_mode
Rename variable 'options' to 'ti' and use sizeof(ti).
2010-07-06 22:30:32 -03: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 4ec07e9443 test-server: Use cfmakeraw to set TTY raw mode
Use cfmakeraw to disable echoing and special characters processing. If
we don't turn off ICRNL, TTY layer translates \r\n to \n\n.
2010-07-06 09:49:48 -03:00
Zhenhua Zhang b86b2d3299 gatppp: Check ppp instance before unref it 2010-07-06 09:47:15 -03:00
Denis Kenzior a92d37454a gsmdial: Wait for a no carrier before sending CFUN 2010-06-29 12:15:44 -05:00
Denis Kenzior 3a6b3bcd0c test-server: Send a NO_CARRIER when ppp is done 2010-06-29 12:12:42 -05:00
Denis Kenzior 2955c206e4 test-server: Update to the new API 2010-06-29 12:01:34 -05:00
Denis Kenzior 674625ebe2 ppp: Don't accept 0 ip-addr/dns1/dns2 2010-06-29 11:55:18 -05:00
Denis Kenzior 820b1f55c8 ppp: Refactor server-side API
The biggest update here is that the server needs to be in dormant mode
by default, so as not to send a Configure-Req to the peer until the peer
is ready.  This requires adding special constructor for LCP to
initialize it to Stopped state instead of initial state.

Along with this, we pass the server local IP directly to the ppp server
constructor.
2010-06-29 11:53:11 -05:00
Denis Kenzior 969862337a test-server: Update to the new API 2010-06-29 11:50:25 -05:00
Denis Kenzior d7c0640412 ppp: Tweak set_server_info API some more 2010-06-29 11:49:40 -05:00
Denis Kenzior 295270b4be hdlc: Stop recording packets to stdout (fd = 0) 2010-06-29 11:46:40 -05:00
Denis Kenzior aca0fdf87f hdlc: Don't bother recording empty packets 2010-06-29 11:46:20 -05:00
Zhenhua Zhang 1afd51a8c7 gsmdial: Configure network interface for PPP 2010-06-28 17:39:23 -05:00
Zhenhua Zhang 0725aba03f test-server: Configure network interface
Require ROOT priviledge to:
1. Run external command to configure and bring up network interface.
2. Enable kernel IP forwarding.
2010-06-28 17:39:18 -05:00
Denis Kenzior 90d240820b ppp: Tweak the set_server_info API 2010-06-28 17:38:54 -05:00
Zhenhua Zhang b6601bfeed test-server: Add PPP server support
So that gsmdial and wvdial could talk to test-server and establish PPP
connection.
2010-06-28 16:37:20 -05:00