diff options
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/src/cli-cmd-peer.c | 12 | ||||
| -rw-r--r-- | cli/src/cli-cmd-volume.c | 24 | 
2 files changed, 35 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-peer.c b/cli/src/cli-cmd-peer.c index d6b4ab147a4..36c328a7c12 100644 --- a/cli/src/cli-cmd-peer.c +++ b/cli/src/cli-cmd-peer.c @@ -90,6 +90,12 @@ out:          CLI_STACK_DESTROY (frame); +#if (USE_EVENTS) +        if (ret == 0) { +                gf_event (EVENT_PEER_ATTACH, "host=%s", (char *)words[2]); +        } +#endif +          return ret;  } @@ -160,6 +166,12 @@ out:          CLI_STACK_DESTROY (frame); +#if (USE_EVENTS) +        if (ret == 0) { +                gf_event (EVENT_PEER_DETACH, "host=%s", (char *)words[2]); +        } +#endif +          return ret;  } diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 2ae4aa2dbf4..08bab2fefb1 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -243,7 +243,11 @@ out:          }          CLI_STACK_DESTROY (frame); - +#if (USE_EVENTS) +        if (ret == 0) { +                gf_event (EVENT_VOLUME_CREATE, "name=%s", (char *)words[2]); +        } +#endif          return ret;  } @@ -318,6 +322,12 @@ out:          CLI_STACK_DESTROY (frame); +#if (USE_EVENTS) +        if (ret == 0) { +                gf_event (EVENT_VOLUME_DELETE, "name=%s", (char *)words[2]); +        } +#endif +          return ret;  } @@ -392,6 +402,12 @@ out:          CLI_STACK_DESTROY (frame); +#if (USE_EVENTS) +        if (ret == 0) { +                gf_event (EVENT_VOLUME_START, "name=%s", (char *)words[2]); +        } +#endif +          return ret;  } @@ -524,6 +540,12 @@ out:          CLI_STACK_DESTROY (frame); +#if (USE_EVENTS) +        if (ret == 0) { +                gf_event (EVENT_VOLUME_STOP, "name=%s", (char *)words[2]); +        } +#endif +          return ret;  }  | 
