diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-11-08 02:31:01 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-11-08 10:32:09 +0000 |
commit | caa1e87410fb74606f2ec91b5fd1b897053149bf (patch) | |
tree | 7d46afa570a24957716f5b74add64760bfeb5079 /ui/gtk/iax2_analysis.c | |
parent | 11bdadacc27d3781c3fd0d759068fddd3da9107c (diff) |
Use ws_{read,write,fdopen,close}.
Be more consistent about using the ws_ routines, as we suggest in
README.developer.
In C++ on UN*X, define ws_close as ::close rather than close, so that it
works even in classes with methods or members named "close".
Change-Id: Ide2652229e6b6b4624cbddae0e909a4ea1efa591
Reviewed-on: https://code.wireshark.org/review/11637
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/gtk/iax2_analysis.c')
-rw-r--r-- | ui/gtk/iax2_analysis.c | 14 |
1 files changed, 7 insertions, 7 deletions
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)) { |