diff options
author | Alberto Mardegan <mardy@users.sourceforge.net> | 2008-04-10 07:21:37 +0000 |
---|---|---|
committer | Alberto Mardegan <mardy@users.sourceforge.net> | 2008-04-10 07:21:37 +0000 |
commit | d92c67101f5f9b4500f67b929ca4ee89b993f0f6 (patch) | |
tree | feb7b88f71ad2a821dd1df4c231304d63d2fbe41 /libmissioncontrol | |
parent | 69abba5f35a1adff39e6c4703d323817697e265e (diff) |
Fix the mc-account tool so that accounts can be created.
git-svn-id: https://mission-control.svn.sourceforge.net/svnroot/mission-control/trunk@346 d91c8aed-3f2b-0410-a83d-924a1c20a0ba
Diffstat (limited to 'libmissioncontrol')
-rw-r--r-- | libmissioncontrol/mc-account-cli.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libmissioncontrol/mc-account-cli.c b/libmissioncontrol/mc-account-cli.c index 7b96c4f9..de1e408b 100644 --- a/libmissioncontrol/mc-account-cli.c +++ b/libmissioncontrol/mc-account-cli.c @@ -39,7 +39,7 @@ show_help (gchar * err) printf ("Usage:\n" " %1$s list\n" - " %1$s add <profile> <display name> string:account=<user_id> string:password=<password> [(int|bool|string):<key>=<value> ...]\n" + " %1$s add <profile> <display name> string:account=<user_id> [(int|bool|string):<key>=<value> ...]\n" " %1$s set <account name> (int|bool|string):<key>=<value> [...]\n" " %1$s display <account name> <display name>\n" " %1$s show <account name>\n" @@ -145,7 +145,7 @@ main (int argc, char **argv) McProfile *profile; McAccount *account; - if (argc < 6) + if (argc < 5) show_help ("Invalid add command."); profile = mc_profile_lookup (argv[2]); @@ -180,6 +180,10 @@ main (int argc, char **argv) printf ("Account not added successfully: %s\n", name); show_help ("Invalid account paramenters"); } + + /* we must iterate the main loop to get the "Valid" property */ + while (g_main_context_iteration (NULL, FALSE)); + if (!mc_account_is_complete (account)) { mc_account_delete (account); |