On 6/28/19 1:01 PM, Daniel Wagner wrote:
On 6/24/19 4:37 PM, Jussi Laakkonen wrote:
> It is not feasible for every VPN plugin to check the errors in D-Bus
> reply sent by VPN agent in their own way. This kind of general use makes
> reacting to the canceled, timed out or no response replies sent by VPN
> agent more common and less error prone.
> The check function (vpn_agent_check_and_process_reply_error()) takes in
> the reply, callback to provider connect function and the pending D-Bus
> message, that will be utilized by the callback
> (vpn-provider.c:connect_cb()). This way proper notifications are passed
> forwards and appropriate reply is sent to the caller of the VPN plugin
> connection request (connmand). By sending the reply the caller
> (connmand) can then disable autoconnection from the VPN to avoid
> re-connection in case the user canceled the VPN agent dialog.
> The errors that are reacted to:
> - net.connman.vpn.Agent.Error.Canceled -> ECANCELED
> - org.freedesktop.DBus.Error.Timeout -> ETIMEDOUT
> - org.freedesktop.DBus.Error.NoReply -> ENOMSG
> - any other error from VPN agent is EACCES
> Error in VPN agent or canceling the VPN agent should not be an error in
> the VPN provider and, therefore, set the provider state to idle. Also,
> if task was already running stop it to avoid leaving VPN processes
Patch applied after removing the two DBG() statements. If you want to
log the interaction please add connman_info() or connman_warn().
Oh, sorry about that, we've been using DBG() in our fork regularly and
old habits die hard. But I'll keep that in mind, thanks for the info.
We have used DBG() a lot to get info only when explicitly enabling
debugging. That is done also to keep system log cleaner in normal use.
But no worries :)