gboolean
_gst_plugin_loader_client_run (void)
{
+ gboolean res = TRUE;
GstPluginLoader *l;
l = plugin_loader_new (NULL);
dup_fd = dup (0); /* STDIN */
if (dup_fd == -1) {
GST_ERROR ("Failed to start. Could no dup STDIN, errno %d", errno);
- return FALSE;
+ res = FALSE;
+ goto beach;
}
l->fd_r.fd = dup_fd;
close (0);
dup_fd = dup (1); /* STDOUT */
if (dup_fd == -1) {
GST_ERROR ("Failed to start. Could no dup STDOUT, errno %d", errno);
- return FALSE;
+ res = FALSE;
+ goto beach;
}
l->fd_w.fd = dup_fd;
close (1);
/* Loop, listening for incoming packets on the fd and writing responses */
while (!l->rx_done && exchange_packets (l));
+beach:
plugin_loader_free (l);
- return TRUE;
+ return res;
}
static void