diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/cli/tap-follow.c | 2 | ||||
-rw-r--r-- | ui/gtk/follow_tcp.c | 2 | ||||
-rw-r--r-- | ui/gtk/iax2_analysis.c | 14 | ||||
-rw-r--r-- | ui/qt/main_window_slots.cpp | 10 | ||||
-rw-r--r-- | ui/win32/file_dlg_win32.c | 6 |
5 files changed, 17 insertions, 17 deletions
diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c index a436f502f1..12239dade3 100644 --- a/ui/cli/tap-follow.c +++ b/ui/cli/tap-follow.c @@ -272,7 +272,7 @@ followFileOpen( followExit("Error duping temp file name."); } - fp->filep = fdopen(fd, "w+b"); + fp->filep = ws_fdopen(fd, "w+b"); if (fp->filep == NULL) { ws_close(fd); diff --git a/ui/gtk/follow_tcp.c b/ui/gtk/follow_tcp.c index aece6aabd6..369a756b3e 100644 --- a/ui/gtk/follow_tcp.c +++ b/ui/gtk/follow_tcp.c @@ -142,7 +142,7 @@ follow_tcp_stream_cb(GtkWidget * w _U_, gpointer data _U_) return; } - data_out_file = fdopen(tmp_fd, "w+b"); + data_out_file = ws_fdopen(tmp_fd, "w+b"); if (data_out_file == NULL) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Could not create temporary file %s: %s", diff --git a/ui/gtk/iax2_analysis.c b/ui/gtk/iax2_analysis.c index 56a10f9770..66eaa00ee5 100644 --- a/ui/gtk/iax2_analysis.c +++ b/ui/gtk/iax2_analysis.c @@ -2364,7 +2364,7 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t * case SAVE_FORWARD_DIRECTION_MASK: { progbar_count = user_data->forward.saveinfo.count; progbar_quantum = user_data->forward.saveinfo.count/100; - while ((fread_cnt = read(forw_fd, f_pd, 1)) > 0) { + while ((fread_cnt = ws_read(forw_fd, f_pd, 1)) > 0) { if (stop_flag) break; if ((count > progbar_nextstep) && (count <= progbar_count)) { @@ -2405,7 +2405,7 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t * case SAVE_REVERSE_DIRECTION_MASK: { progbar_count = user_data->reversed.saveinfo.count; progbar_quantum = user_data->reversed.saveinfo.count/100; - while ((rread = read(rev_fd, r_pd, 1)) > 0) { + while ((rread = ws_read(rev_fd, r_pd, 1)) > 0) { if (stop_flag) break; if ((count > progbar_nextstep) && (count <= progbar_count)) { @@ -2468,7 +2468,7 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t * } count++; if (f_write_silence > 0) { - rread = read(rev_fd, r_pd, 1); + rread = ws_read(rev_fd, r_pd, 1); switch (user_data->forward.statinfo.reg_pt) { case AST_FORMAT_ULAW: *f_pd = SILENCE_PCMU; @@ -2481,7 +2481,7 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t * f_write_silence--; } else if (r_write_silence > 0) { - fread_cnt = read(forw_fd, f_pd, 1); + fread_cnt = ws_read(forw_fd, f_pd, 1); switch (user_data->reversed.statinfo.reg_pt) { case AST_FORMAT_ULAW: *r_pd = SILENCE_PCMU; @@ -2494,8 +2494,8 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t * r_write_silence--; } else { - fread_cnt = read(forw_fd, f_pd, 1); - rread = read(rev_fd, r_pd, 1); + fread_cnt = ws_read(forw_fd, f_pd, 1); + rread = ws_read(rev_fd, r_pd, 1); } if ((rread == 0) && (fread_cnt == 0)) break; @@ -2561,7 +2561,7 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t * /* XXX how do you just copy the file? */ - while ((rread = read(fd, pd, 1)) > 0) { + while ((rread = ws_read(fd, pd, 1)) > 0) { if (stop_flag) break; if ((count > progbar_nextstep) && (count <= progbar_count)) { diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index e4eab4e43a..d4867b8050 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -1652,12 +1652,12 @@ void MainWindow::on_actionFileExportPacketBytes_triggered() open_failure_alert_box(file_name.toUtf8().constData(), errno, TRUE); return; } - if (write(fd, data_p, capture_file_.capFile()->finfo_selected->length) < 0) { + if (ws_write(fd, data_p, capture_file_.capFile()->finfo_selected->length) < 0) { write_failure_alert_box(file_name.toUtf8().constData(), errno); - ::close(fd); + ws_close(fd); return; } - if (::close(fd) < 0) { + if (ws_close(fd) < 0) { write_failure_alert_box(file_name.toUtf8().constData(), errno); return; } @@ -1726,11 +1726,11 @@ void MainWindow::on_actionFileExportSSLSessionKeys_triggered() */ if (ws_write(fd, keylist, (unsigned int)strlen(keylist)) < 0) { write_failure_alert_box(file_name.toUtf8().constData(), errno); - ::close(fd); + ws_close(fd); g_free(keylist); return; } - if (::close(fd) < 0) { + if (ws_close(fd) < 0) { write_failure_alert_box(file_name.toUtf8().constData(), errno); g_free(keylist); return; diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c index d9b5d026c1..9e9c32d6c5 100644 --- a/ui/win32/file_dlg_win32.c +++ b/ui/win32/file_dlg_win32.c @@ -797,12 +797,12 @@ win32_export_raw_file(HWND h_wnd, capture_file *cf) { open_failure_alert_box(file_name8, errno, TRUE); return; } - if (write(fd, data_p, cf->finfo_selected->length) < 0) { + if (ws_write(fd, data_p, cf->finfo_selected->length) < 0) { write_failure_alert_box(file_name8, errno); - close(fd); + ws_close(fd); return; } - if (close(fd) < 0) { + if (ws_close(fd) < 0) { write_failure_alert_box(file_name8, errno); return; } |