Remove the series of constructors which take a GIOChannel directly.
These weren't used.
This change also allows the construction of the PPP object and filling
in various pertinent information without starting the HDLC processing.
The client must now use g_at_ppp_open() for the client side or
g_at_ppp_listen() for the server side to start the true PPP session.
The previous owner of the GAtIO object must be suspended beforehand.
The previous thinking was to use the PPP stack to send Conf-Naks with
some delay to client requests until the IP configuration was setup
correctly. However, we now hide this by using the delay during the
processing of the ATD. This code is no longer relevant.
In PPP Protocol-Reject package the 'rejected data field' should be a copy
of the rejected package, the copy starts from the data field. besides,
Protocol-Reject package include a 'rejected protocol field', it is the
same as the protocol field of the rejected package.
Protocol-Reject package structure is:
| PPP_header | rejected protocol | rejected data
The rejected package structure is:
| Addr | Control | protocol | data
So the Protocol-Reject package data field is copied from the 3rd byte of
the rejected package.
In case of offline modem when GPRS data connection is connected, if gprs
atom is removed before PPP termination process is complete, the terminate_timer
will not be stop. It will cause ofonod crash when the timer times out.
Extend the write buffer handling in gathdlc.c to minimize stalling and
process switching during large PPP transfers. The single write buffer
is replaced by a queue of buffers, allowing for much larger emission
windows without hugely impacting memory consumption. This reduces the
time required to send 50 MB between a couple of local PPP interfaces on
my laptop from ~53s to ~3s.
Replace modulo operations in ringbuffer.c by masking operations. This
is possible because the size of the ring buffers is always a power of
two, and yields a small performance improvement.
The improvement should be mostly visible on processors that implement
division in microcode (Atom) or lack a division instruction (ARM).
Delay signaling of ppp_down until we exit the GAtHDLC read handler.
Otherwise exchanging the read handler on GAtIO might lead to funny
double consumption problems.
Sometimes we receive the no carrier embedded in a stream following the
PPP packets. This might be due to write scheduling on the remote side
or read scheduling locally. Try not to consume the no carrier condition
and assume the previous hdlc frames will result in closing of the ppp
stack.
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.
Using my Huawei EM770W modem, if set ACCM as 0x00000000, RXJ-
event breaks PPP link, after IP package transmit for a while.
Using default ACCM, the issue can be fixed.
I tested it at China Unicom networks.
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.
According to RFC1662 Section 7.1, ACCM Configuration Option is
used to inform the peer which control characters MUST remain
mapped when the peer sends them.
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
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>
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.
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.