+ ret = -1;
+ goto end;
+ }
+ break;
+ }
+ case UST_RELEASE:
+ {
+ struct lttcomm_ust_reply lur;
+
+ DBG("Handling release message, handle: %d",
+ lum->handle);
+ memset(&lur, 0, sizeof(lur));
+ lur.cmd_type = UST_RELEASE;
+
+ ret = objd_unref(lum->handle);
+ if (!ret) {
+ lur.ret_code = LTTCOMM_OK;
+ } else {
+ lur.ret_code = LTTCOMM_ERR;
+ }
+ len = lttcomm_send_unix_sock(sock, &lur, sizeof(lur));
+ switch (len) {
+ case sizeof(lur):
+ DBG("message successfully sent\n");
+ break;
+ case -1:
+ if (errno == ECONNRESET) {
+ printf("remote end closed connection\n");
+ ret = 0;
+ goto end;
+ }
+ ret = -1;
+ goto end;
+ default:
+ printf("incorrect message size: %zd\n", len);
+ ret = -1;
+ goto end;