aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/catapult_dct2000.c
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/catapult_dct2000.c')
-rw-r--r--wiretap/catapult_dct2000.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c
index 8b29a23880..aece8e75fd 100644
--- a/wiretap/catapult_dct2000.c
+++ b/wiretap/catapult_dct2000.c
@@ -103,12 +103,12 @@ static const gchar catapult_dct2000_magic[] = "Session Transcript";
/************************************************************/
/* Functions called from wiretap core */
-static gboolean catapult_dct2000_read(wtap *wth, int *err, gchar **err_info,
- gint64 *data_offset);
-static gboolean catapult_dct2000_seek_read(wtap *wth, gint64 seek_off,
- struct wtap_pkthdr *phdr,
- Buffer *buf, int *err,
- gchar **err_info);
+static int catapult_dct2000_read(wtap *wth, int *err, gchar **err_info,
+ gint64 *data_offset);
+static int catapult_dct2000_seek_read(wtap *wth, gint64 seek_off,
+ struct wtap_pkthdr *phdr,
+ Buffer *buf, int *err,
+ gchar **err_info);
static void catapult_dct2000_close(wtap *wth);
static gboolean catapult_dct2000_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
@@ -331,9 +331,9 @@ static void write_timestamp_string(char *timestamp_string, int secs, int tenthou
/**************************************************/
/* Read packet function. */
/* Look for and read the next usable packet */
-/* - return TRUE and details if found */
+/* - return REC_TYPE_PACKET and details if found */
/**************************************************/
-static gboolean
+static int
catapult_dct2000_read(wtap *wth, int *err, gchar **err_info,
gint64 *data_offset)
{
@@ -370,7 +370,7 @@ catapult_dct2000_read(wtap *wth, int *err, gchar **err_info,
if (!read_new_line(wth->fh, &offset, &line_length, linebuff,
sizeof linebuff, err, err_info)) {
if (*err != 0)
- return FALSE; /* error */
+ return -1; /* error */
/* No more lines can be read, so quit. */
break;
}
@@ -434,19 +434,19 @@ catapult_dct2000_read(wtap *wth, int *err, gchar **err_info,
g_hash_table_insert(file_externals->packet_prefix_table, pkey, line_prefix_info);
/* OK, we have packet details to return */
- return TRUE;
+ return REC_TYPE_PACKET;
}
}
/* No packet details to return... */
- return FALSE;
+ return -1;
}
/**************************************************/
/* Read & seek function. */
/**************************************************/
-static gboolean
+static int
catapult_dct2000_seek_read(wtap *wth, gint64 seek_off,
struct wtap_pkthdr *phdr, Buffer *buf,
int *err, gchar **err_info)
@@ -476,13 +476,13 @@ catapult_dct2000_seek_read(wtap *wth, gint64 seek_off,
/* Seek to beginning of packet */
if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1) {
- return FALSE;
+ return -1;
}
/* Re-read whole line (this really should succeed) */
if (!read_new_line(wth->random_fh, &offset, &length, linebuff,
sizeof linebuff, err, err_info)) {
- return FALSE;
+ return -1;
}
/* Try to parse this line again (should succeed as re-reading...) */
@@ -508,7 +508,7 @@ catapult_dct2000_seek_read(wtap *wth, gint64 seek_off,
is_comment, data_chars);
*err = errno = 0;
- return TRUE;
+ return REC_TYPE_PACKET;
}
/* If get here, must have failed */
@@ -516,7 +516,7 @@ catapult_dct2000_seek_read(wtap *wth, gint64 seek_off,
*err_info = g_strdup_printf("catapult dct2000: seek_read failed to read/parse "
"line at position %" G_GINT64_MODIFIER "d",
seek_off);
- return FALSE;
+ return -1;
}