Not doing this creates a race condition where any notification
comming in in the middle of a sequence of commands may be counted
as a response to one of the commands and get lost.
Sometimes, Udev device 'remove' event could not report correct parent
node of current udev_device. Current code replies on the devpath
attached on the parent node to find modem and then remove it.
This fix is to change the way to store the devpath info into a
hashtable. So that we search hashtable to get devpath and remove the
modem.
Any timeouts set must be removed using g_source_remove. Failure to do
so results in sigsegvs when the modem is randomly removed during the
initialization cycle.
When the state goes from INSERTED to NOT PRESENT and we have not
advanced past the SIM PIN entry, we remove the pre_sim atoms.
Similarly, if we advanced past the SIM PIN stage and subsequently
removed the SIM, the pre_sim atom list should not be tampered with.
Right now it is very hard to figure out whether we should be calling the
connect callback or the disconnect callback. So refactor as follows:
- Connect callback is only called once the net is actually up
- Disconnect callback is called once ppp is down, with a reason
for why it is so.
This function simply didn't have the context of why the phase was being
entered. Instead have each protocol notify GAtPPP as to what is
happening. We already had this more or less for IPCP and AUTH events,
this just now formalizes it for LCP as well.
In the case that parent path data needs to be invalidated we shouldn't
stop at the immediate parent if it doesn't have our own handler
registered but should continue upwards in the tree until we reach root
or our own handler.
remove call to signal_close for lcp object, it is redundent. If
our io is destroyed we are dead, so transition the ppp phase to
DEAD so our disconnect callback can be called.
Marcel: recording right now only works for PPP, so we'd need some sort
of multi-protocol support.
So for now expose set_recording to be used through the main PPP object.
HDLC object recording support needs to be extended.