+ struct lttng_tracker_id id;
+
+ memset(&id, 0, sizeof(id));
+ id.type = cmd_ctx->lsm->u.id_tracker.id_type;
+ switch (id.type) {
+ case LTTNG_ID_ALL:
+ break;
+ case LTTNG_ID_VALUE:
+ id.value = cmd_ctx->lsm->u.id_tracker.u.value;
+ break;
+ case LTTNG_ID_STRING:
+ {
+ size_t var_len = cmd_ctx->lsm->u.id_tracker.u.var_len;
+
+ id.string = zmalloc(var_len);
+ if (!id.string) {
+ ret = LTTNG_ERR_NOMEM;
+ goto error;
+ }
+ DBG("Receiving var len tracker id string from client.");
+ ret = lttcomm_recv_unix_sock(sock, id.string, var_len);
+ if (ret <= 0) {
+ DBG("Nothing received.");
+ *sock_error = 1;
+ free(id.string);
+ ret = LTTNG_ERR_INVALID;
+ goto error;
+ }
+ if (strnlen(id.string, var_len) != var_len - 1) {
+ DBG("Corrupted string.");
+ free(id.string);
+ ret = LTTNG_ERR_INVALID;
+ goto error;
+ }
+ break;
+ }
+ default:
+ ret = LTTNG_ERR_INVALID;
+ goto error;
+ }
+ ret = cmd_untrack_id(cmd_ctx->session,
+ cmd_ctx->lsm->u.id_tracker.tracker_type,