diff options
Diffstat (limited to 'extcap.c')
-rw-r--r-- | extcap.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1547,13 +1547,13 @@ static gboolean extcap_create_pipe(const gchar *ifname, gchar **fifo, HANDLE *ha return TRUE; } #else -static gboolean extcap_create_pipe(const gchar *ifname, gchar **fifo, const gchar *pipe_prefix) +static gboolean extcap_create_pipe(const gchar *ifname, gchar **fifo, const gchar *temp_dir, const gchar *pipe_prefix) { gchar *temp_name = NULL; int fd = 0; gchar *pfx = g_strconcat(pipe_prefix, "_", ifname, NULL); - if ((fd = create_tempfile(&temp_name, pfx, NULL, NULL)) < 0) + if ((fd = create_tempfile(temp_dir, &temp_name, pfx, NULL, NULL)) < 0) { g_free(pfx); return FALSE; @@ -1611,11 +1611,15 @@ extcap_init_interfaces(capture_options *capture_opts) extcap_create_pipe(interface_opts->name, &interface_opts->extcap_control_in, #ifdef _WIN32 &interface_opts->extcap_control_in_h, +#else + capture_opts->temp_dir, #endif EXTCAP_CONTROL_IN_PREFIX); extcap_create_pipe(interface_opts->name, &interface_opts->extcap_control_out, #ifdef _WIN32 &interface_opts->extcap_control_out_h, +#else + capture_opts->temp_dir, #endif EXTCAP_CONTROL_OUT_PREFIX); } @@ -1624,6 +1628,8 @@ extcap_init_interfaces(capture_options *capture_opts) if (!extcap_create_pipe(interface_opts->name, &interface_opts->extcap_fifo, #ifdef _WIN32 &interface_opts->extcap_pipe_h, +#else + capture_opts->temp_dir, #endif EXTCAP_PIPE_PREFIX)) { |