diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2009-09-13 13:00:40 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2009-09-13 13:00:40 +0800 |
commit | 7718f3ff1b69f79f468068cffc56dd041cc6c8eb (patch) | |
tree | abd690f80e7612622f2923cf569b226152928f52 | |
parent | afa1aacef900d238b39434c5774ae5e6eee7faad (diff) |
sopcastsrc: close the heatbeat sock if failed to spawn sp-sc
-rw-r--r-- | src/gstscsrc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gstscsrc.c b/src/gstscsrc.c index 1d4b4f8..5bbccf2 100644 --- a/src/gstscsrc.c +++ b/src/gstscsrc.c @@ -660,7 +660,7 @@ gst_sopcast_src_subproc_main (GstSopcastSrc * src, pid_t ppid, int sock) char buf[1024]; if (!gst_sopcast_src_spawn_helper (src)) - _exit (-1); + goto goodbye; max = sysconf(_SC_OPEN_MAX); for (i = 3; i < max; i++) @@ -725,6 +725,7 @@ gst_sopcast_src_subproc_main (GstSopcastSrc * src, pid_t ppid, int sock) GST_DEBUG_OBJECT (src, "sp-sc is killed."); +goodbye: GST_DEBUG_OBJECT (src, "say goodbye back to player.", ppid); send (sock, "bye", 3, 0); close (sock); @@ -776,7 +777,7 @@ gst_sopcast_src_start (GstBaseSrc * bsrc) src->heatebeat_fd = -1; if (!gst_sopcast_src_spawn_sopcast (src)) { - GST_ERROR_OBJECT (src, "Coudn't spawn the sp-sc."); + GST_ERROR_OBJECT (src, "Coudn't spawn the helper."); return FALSE; } |