Move the new files to the same places as in automake.
[obnox/wireshark/wip.git] / wiretap / k12.c
index 1064a04ac06b1679c03a6091f399b0896b323c96..cabfd26935bc64569bea9fbfb281a655ac0e59db 100644 (file)
@@ -337,7 +337,7 @@ static gint get_record(guint8** bufferp, FILE_T fh, gint64 file_offset,
     /* XXX - Is WTAP_MAX_PACKET_SIZE */
     if (left < 4 || left > WTAP_MAX_PACKET_SIZE) {
         K12_DBG(1,("get_record: Invalid GET length=%u",left));
-        *err = WTAP_ERR_BAD_RECORD;
+        *err = WTAP_ERR_BAD_FILE;
         *err_info = g_strdup_printf("get_record: Invalid GET length=%u",left);
         return -1;
     }
@@ -450,6 +450,8 @@ static gboolean k12_read(wtap *wth, int *err, gchar **err_info, gint64 *data_off
 
     wth->data_offset = offset;
 
+    wth->phdr.presence_flags = WTAP_HAS_TS;
+
     ts = pntohll(buffer + K12_PACKET_TIMESTAMP);
 
     wth->phdr.ts.secs = (guint32) ((ts / 2000000) + 631152000);
@@ -501,7 +503,7 @@ static gboolean k12_read(wtap *wth, int *err, gchar **err_info, gint64 *data_off
 }
 
 
-static gboolean k12_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_header *pseudo_header, guchar *pd, int length, int *err _U_, gchar **err_info) {
+static gboolean k12_seek_read(wtap *wth, gint64 seek_off, union wtap_pseudo_header *pseudo_header, guint8 *pd, int length, int *err _U_, gchar **err_info) {
     k12_t *k12 = (k12_t *)wth->priv;
     k12_src_desc_t* src_desc;
     guint8* buffer;
@@ -985,7 +987,7 @@ static void k12_dump_src_setting(gpointer k _U_, gpointer v, gpointer p) {
 
 static gboolean k12_dump(wtap_dumper *wdh, const struct wtap_pkthdr *phdr,
                          const union wtap_pseudo_header *pseudo_header,
-                         const guchar *pd, int *err) {
+                         const guint8 *pd, int *err) {
     k12_dump_t *k12 = (k12_dump_t *)wdh->priv;
     guint32 len;
     union {