Hi Thomas, Beniamino, thanks for taking time to read and reply to my previous message. 2017-11-24 21:55 GMT+01:00 Beniamino Galvani <bgalvani redhat com>:
Actually, I don't think this can work since there isn't a GLib main loop... so probably we should just change the async calls to sync (perhaps only when we know that pppd is about to exit, i.e. for the DISCONNECT signal)?
Is it really needed to receive and process notifications about internal pppd state changes? Since pppd is/should be running in nopersist mode pppd should exit upon connection termination. Actually there were only two 'live' cases where this information is used in NM and both are related with disconnect and cause ppp_failed() to run as mentioned in my previous message. I attach patch I'm using now and it works OK for pppd with ModemManager. I don't think it's directly upstreamable as it affects pppoe and bluetooth (which have ppp_failed() copy-pasted) which I can't test now and which would potentially be harmed by this patch but maybe illustrates potential solution. Best regards, Piotr.
Attachment:
pppd-exit.patch
Description: Text Data