Add DBUS communication in dbus.py, update README and add changes to sources

This commit is contained in:
Max Moser committed 2017-12-20 13:00:13 +01:00
1 parent d606210675
commit fb4cfa2413
4 files changed
+170 -18

No files matched your search

+9 -1
View File
@@ -457,6 +457,8 @@ main (int argc, char *argv[])
AskUserFunc ask_user_func = NULL;
FinishFunc finish_func = NULL;
// this describes how the arguments are supposed to be parsed
// e.g. "-u UUID"
GOptionContext *context;
GOptionEntry entries[] = {
{ "reprompt", 'r', 0, G_OPTION_ARG_NONE, &retry, "Reprompt for passwords", NULL},
@@ -485,16 +487,22 @@ main (int argc, char *argv[])
return EXIT_FAILURE;
}
// the parameters are supplied via arguments
printf("UUID: %s, Name: %s, Service: %s\n", vpn_uuid, vpn_name, vpn_service);
if (strcmp (vpn_service, NM_VPN_SERVICE_TYPE_OPENVPN) != 0) {
fprintf (stderr, "This dialog only works with the '%s' service\n", NM_VPN_SERVICE_TYPE_OPENVPN);
return EXIT_FAILURE;
}
printf("Reading stdin details\n");
// reads secrets/data from STDIN until "DONE" is read
if (!nm_vpn_service_plugin_read_vpn_details (0, &data, &secrets)) {
fprintf (stderr, "Failed to read '%s' (%s) data and secrets from stdin.\n",
vpn_name, vpn_uuid);
return 1;
//return 1; // TODO re-add
}
printf("Done reading\n");
if (external_ui_mode) {
no_secrets_required_func = eui_no_secrets_required;