Commit c0b13260 authored by Dan Williams's avatar Dan Williams
Browse files

2005-05-16 Dan Williams <dcbw@redhat.com>

	* vpn-daemons/vpnc/nm-vpnc-service-vpnc-helper.c
		- (main): Work correctly with vpnc 0.3.3 by exiting if the "reason" code
			is not "connect"


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@638 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent bfd38e3a
2005-05-16 Dan Williams <dcbw@redhat.com>
* vpn-daemons/vpnc/nm-vpnc-service-vpnc-helper.c
- (main): Work correctly with vpnc 0.3.3 by exiting if the "reason" code
is not "connect"
2005-05-16 Dan Williams <dcbw@redhat.com>
Patch from Tomislav Vujec <tvujec@redhat.com>
......
......@@ -220,6 +220,7 @@ int main( int argc, char *argv[] )
{
DBusConnection * con;
DBusError error;
char * reason = NULL;
char * vpn_gateway = NULL;
char * tundev = NULL;
char * internal_ip4_address = NULL;
......@@ -242,6 +243,13 @@ int main( int argc, char *argv[] )
}
dbus_connection_set_exit_on_disconnect (con, FALSE);
/* vpnc 0.3.3 gives us a "reason" code. If we are given one,
* don't proceed unless its "connect".
*/
reason = getenv ("reason");
if (reason && strcmp (reason, "connect") != 0)
exit (0);
vpn_gateway = getenv ("VPNGATEWAY");
tundev = getenv ("TUNDEV");
internal_ip4_address = getenv ("INTERNAL_IP4_ADDRESS");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment