#include "string.h"
#include "afh.h"
#include "afs.h"
-#include "server.h"
#include "net.h"
+#include "server.h"
#include "list.h"
#include "send.h"
#include "sched.h"
if (fcp->init_fec) {
/*
* Set the maximum slice size to the Maximum Packet Size if the
- * transport protocol allows to determine this value. The user
+ * transport protocol allows determination of this value. The user
* can specify a slice size up to this value.
*/
ret = fcp->init_fec(fc->sc);
struct vss_task *vsst = context;
ret = task_get_notification(vsst->task);
- if (ret < 0)
+ if (ret < 0) {
+ afh_free_header(vsst->header_buf, mmd->afd.audio_format_id);
return ret;
+ }
if (!vsst->map || vss_next() || vss_paused() || vss_repos()) {
/* shut down senders and fec clients */
struct fec_client *fc, *tmp;
.context = vsst,
}, s);
}
+
+/**
+ * Turn off the virtual streaming system.
+ *
+ * This is only executed on exit. It calls the ->shutdowwn method of all senders.
+ */
+void vss_shutdown(void)
+{
+ int i;
+
+ FOR_EACH_SENDER(i) {
+ if (!senders[i]->shutdown)
+ continue;
+ PARA_NOTICE_LOG("shutting down %s sender\n", senders[i]->name);
+ senders[i]->shutdown();
+ }
+}