small fixes and improvements for packet forwarding feature #411

Change-Id: Ibf7aba46b38900d405824ab79005de65cd0be7d9
pull/420/head
Richard Fuchs 8 years ago
parent fb6575eefb
commit ba4676809d

@ -1,7 +1,8 @@
#include "forward.h"
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <fcntl.h>
#include "forward.h"
#include "main.h"
#include "log.h"
@ -14,7 +15,11 @@ void start_forwarding_capture(metafile_t *mf, char *meta_info) {
return;
}
#ifdef SOCK_SEQPACKET
if ((sock = socket(AF_UNIX, SOCK_SEQPACKET, 0)) == -1) {
#else
if ((sock = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
#endif
ilog(LOG_ERR, "Error creating socket: %s", strerror(errno));
return;
}

@ -25,10 +25,8 @@ static void meta_free(void *ptr) {
metafile_t *mf = ptr;
dbg("freeing metafile info for %s", mf->name);
if (output_enabled) {
output_close(mf->mix_out);
mix_destroy(mf->mix);
}
output_close(mf->mix_out);
mix_destroy(mf->mix);
g_string_chunk_free(mf->gsc);
for (int i = 0; i < mf->streams->len; i++) {
stream_t *stream = g_ptr_array_index(mf->streams, i);
@ -36,7 +34,7 @@ static void meta_free(void *ptr) {
stream_free(stream);
}
g_ptr_array_free(mf->streams, TRUE);
if (output_enabled)
if (mf->ssrc_hash)
g_hash_table_destroy(mf->ssrc_hash);
g_slice_free1(sizeof(*mf), mf);
}

Loading…
Cancel
Save