do not attempt to close virtual channels during shutdown. First off,
the mainloop is no longer running, second, we're about to tell the
modem to completely turn off.
NOTE: Ideally this would be fixed properly, such as -- first closing
all the channels, _then_ flagging the mainloop to quit. After that,
running some -- modem specific -- power off command. We can't use it
like that on the mc75i.
Paul Fertser [Tue, 20 Jan 2009 22:44:39 +0000 (01:44 +0300)]
Implement proper channel allocation and dealloction
With this patch the muxer will allocate channels in a clean way, it will
not return a pts until the modem is really ready to operate on this
channel. It will also retry the command several times until the channel is
allocated.
Channel deallocation is also greatly improved, now we send a correct code to
close a channel and will repeat several times if the packet somehow (e.g.
modem was in power-saving state) lost.
root [Sun, 21 Dec 2008 22:21:22 +0000 (01:21 +0300)]
Implement write buffering for the ptys
If the receiving side of the pty is slow, the kernel pty buffer (of 4096
bytes) overflows and an unreported lossage occurs. This can be seen when
receiving a large SIM phonebook with busy frameworkd.
Paul Fertser [Thu, 4 Dec 2008 17:27:39 +0000 (20:27 +0300)]
Fixed a bug with a 2048-sized transfer from modem
As the circular buffer is used to hold the incoming data from the modem,
its free size must be one byte less than is actually available or we'll get
readp == writep and the buffer will be considered empty.