- /* get shm fd */
- ret = ustcomm_recv_fd(sock);
- if (ret < 0)
- goto error;
- metadata_data->shm_fd = ret;
- /* get wait fd */
- ret = ustcomm_recv_fd(sock);
- if (ret < 0)
+ /* get shm path */
+ shm_path = ustcomm_recv_string(sock);
+ if (!shm_path) {
+ err = 1;
+ } else {
+ DBG("Received shm path: %s\n", shm_path);
+ metadata_data->shm_fd = get_dummy_fd();
+ metadata_data->shm_path = shm_path;
+ }
+
+ /*
+ * We need to get the second FD even if the first fails, because
+ * libust expects us to read the two FDs.
+ */
+
+ /* get wait pipe path */
+ wait_pipe_path = ustcomm_recv_string(sock);
+ if (!wait_pipe_path) {
+ free(shm_path);
+ err = 1;
+ } else {
+ DBG("Received wait pipe path: %s\n", wait_pipe_path);
+ metadata_data->wait_fd = get_dummy_fd();
+ metadata_data->wait_pipe_path = wait_pipe_path;
+ }
+
+
+ if (err)