Fix disable event
authorDavid Goulet <david.goulet@polymtl.ca>
Wed, 5 Oct 2011 22:40:19 +0000 (18:40 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Wed, 5 Oct 2011 22:40:19 +0000 (18:40 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
liblttngctl/lttngctl.c
lttng/commands/disable_events.c

index 0442a4f02bdbc686a868bf1abbc40a1896420894..4c4cf80d33d866916510d774910a4ca231fca156 100644 (file)
@@ -541,7 +541,7 @@ int lttng_disable_event(struct lttng_handle *handle, const char *name,
 
        copy_lttng_domain(&lsm.domain, &handle->domain);
 
-       if (name == NULL) {
+       if (name != NULL) {
                copy_string(lsm.u.disable.name, name, sizeof(lsm.u.disable.name));
                lsm.cmd_type = LTTNG_DISABLE_EVENT;
        } else {
index b4d5ecb040d92894d9ab189cdeccff8d18c84afd..f30a2b28ac4ea629f7ea0266b6574b3d4e90630a 100644 (file)
@@ -86,7 +86,6 @@ static int disable_events(char *session_name)
 {
        int err, ret = CMD_SUCCESS;
        char *event_name, *channel_name = NULL;
-       struct lttng_event ev;
        struct lttng_domain dom;
 
        if (opt_channel_name == NULL) {
@@ -126,9 +125,6 @@ static int disable_events(char *session_name)
                        DBG("Disabling kernel event %s for channel %s",
                                        event_name, channel_name);
 
-                       /* Copy name and type of the event */
-                       strncpy(ev.name, event_name, LTTNG_SYMBOL_NAME_LEN);
-                       ev.name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0';
                        ret = lttng_disable_event(handle, event_name, channel_name);
                        if (ret < 0) {
                                MSG("Unable to disable event %s for channel %s",
This page took 0.026336 seconds and 4 git commands to generate.