diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-07-28 01:57:44 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-28 01:58:49 -0700 |
commit | abbc27d2b1460a10d7168114f2252313b98e4a08 (patch) | |
tree | 29b200e23f7c69c20759d6bc7af0a9cc6da69ecc /cli/src | |
parent | 9460675a921d504a31088b0e0f42143cc7f2a56f (diff) |
cli: Init conditional mutex at the right place
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1205 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1205
Diffstat (limited to 'cli/src')
-rw-r--r-- | cli/src/cli-cmd.c | 3 | ||||
-rw-r--r-- | cli/src/cli.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/cli/src/cli-cmd.c b/cli/src/cli-cmd.c index ee30ea996e6..b4967d2cca6 100644 --- a/cli/src/cli-cmd.c +++ b/cli/src/cli-cmd.c @@ -248,10 +248,9 @@ cli_cmd_await_connected () int32_t cli_cmd_broadcast_connected () { - connected = 1; - gf_log ("", GF_LOG_NORMAL, "Connected"); pthread_mutex_lock (&conn_mutex); { + connected = 1; pthread_cond_broadcast (&conn); } diff --git a/cli/src/cli.c b/cli/src/cli.c index 59782b42db2..31305b05dc7 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -519,12 +519,11 @@ main (int argc, char *argv[]) if (ret) goto out; - - ret = cli_input_init (&state); + ret = cli_cmd_cond_init (); if (ret) goto out; - ret = cli_cmd_cond_init (); + ret = cli_input_init (&state); if (ret) goto out; |