+ free(channel_name);
+ free(marker_name);
+ } else if (nth_token_is(recvbuf, "disable_marker", 0) == 1) {
+ char *channel_slash_name = nth_token(recvbuf, 1);
+ char *marker_name = NULL;
+ char *channel_name = NULL;
+
+ result = sscanf(channel_slash_name, "%a[^/]/%as", &channel_name, &marker_name);
+
+ if (channel_name == NULL || marker_name == NULL) {
+ WARN("invalid marker name");
+ free(channel_name);
+ free(marker_name);
+ goto next_cmd;
+ }
+
+ result = ltt_marker_disconnect(channel_name, marker_name, "default");
+ if (result < 0) {
+ WARN("could not disable marker; channel=%s, name=%s", channel_name, marker_name);
+ }
+
+ free(channel_name);
+ free(marker_name);
+ } else if (nth_token_is(recvbuf, "get_pidunique", 0) == 1) {
+ char *reply;
+
+ if (asprintf(&reply, "%lld", pidunique) < 0) {
+ ERR("process_client_cmd : asprintf failed (%lld)",
+ pidunique);
+ goto next_cmd;
+ }
+
+ result = ustcomm_send_reply(&ustcomm_app.server, reply, src);
+ if (result) {
+ ERR("listener: get_pidunique: ustcomm_send_reply failed");
+ goto next_cmd;
+ }
+
+ free(reply);
+ } else if (nth_token_is(recvbuf, "get_sock_path", 0) == 1) {
+ char *reply = getenv("UST_DAEMON_SOCKET");
+ if (!reply) {
+ if (asprintf(&reply, "%s/%s", SOCK_DIR, "ustd") < 0) {
+ ERR("process_client_cmd : asprintf failed (%s/ustd)",
+ SOCK_DIR);
+ goto next_cmd;
+ }
+ result = ustcomm_send_reply(&ustcomm_app.server, reply, src);
+ free(reply);
+ } else {
+ result = ustcomm_send_reply(&ustcomm_app.server, reply, src);
+ }
+ if (result)
+ ERR("ustcomm_send_reply failed");
+ } else if (nth_token_is(recvbuf, "set_sock_path", 0) == 1) {
+ char *sock_path = nth_token(recvbuf, 1);
+ result = setenv("UST_DAEMON_SOCKET", sock_path, 1);
+ if (result)
+ ERR("cannot set UST_DAEMON_SOCKET environment variable");
+ } else if (nth_token_is(recvbuf, "force_switch", 0) == 1) {
+ do_cmd_force_switch();
+ } else {
+ ERR("unable to parse message: %s", recvbuf);