aboutsummaryrefslogtreecommitdiffstats
path: root/merge.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-10-28 01:52:05 +0000
committerGuy Harris <guy@alum.mit.edu>2004-10-28 01:52:05 +0000
commit66e85e4e43fbd8c68a3adfd33f19b94447443f6c (patch)
treefa22c27464d09e7f33ee51d49fd27a95d23d2595 /merge.h
parentdc2280bc1e22000691e46cd213e08b1123e516cd (diff)
Make "merge_files()" and "merge_append_files()" return a tri-state
indication - success, read failure, write failure - and have their callers handle read failures by looking for the file that got the read failure and reporting the failure in question. Free up the err_info string returned by "wtap_read()" after using it. svn path=/trunk/; revision=12423
Diffstat (limited to 'merge.h')
-rw-r--r--merge.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/merge.h b/merge.h
index e48942c071..fe7bf296e6 100644
--- a/merge.h
+++ b/merge.h
@@ -114,15 +114,25 @@ merge_select_frame_type(int in_file_count, merge_in_file_t in_files[]);
extern int
merge_max_snapshot_length(int in_file_count, merge_in_file_t in_files[]);
+/*
+ * Status from the merge-files routines.
+ */
+typedef enum {
+ MERGE_SUCCESS,
+ MERGE_READ_ERROR,
+ MERGE_WRITE_ERROR
+} merge_status_e;
+
/** Merge the packets from the input files into the output file sorted chronologically.
*
* @param in_file_count number of entries in in_files
* @param in_files input file array
* @param out_file the output file array
* @param err wiretap error, if failed
- * @return TRUE on success or read failure, FALSE on write failure
+ * @return MERGE_SUCCESS on success, MERGE_READ_ERROR on read error,
+ * MERGE_WRITE_ERROR on write error
*/
-extern gboolean
+extern merge_status_e
merge_files(int in_file_count, merge_in_file_t in_files[], merge_out_file_t *out_file, int *err);
/** Append the packets from the input files into the output file.
@@ -131,9 +141,10 @@ merge_files(int in_file_count, merge_in_file_t in_files[], merge_out_file_t *out
* @param in_files input file array
* @param out_file the output file array
* @param err wiretap error, if failed
- * @return TRUE on success or read failure, FALSE on write failure
+ * @return MERGE_SUCCESS on success, MERGE_READ_ERROR on read error,
+ * MERGE_WRITE_ERROR on write error
*/
-extern gboolean
+extern merge_status_e
merge_append_files(int in_file_count, merge_in_file_t in_files[],
merge_out_file_t *out_file, int *err);