Wireshark-commits: [Wireshark-commits] rev 46803: /trunk/wiretap/ /trunk/wiretap/: 5views.c aethra.

Date: Thu, 27 Dec 2012 12:19:26 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=46803

User: guy
Date: 2012/12/27 04:19 AM

Log:
 Do not call wtap_file_read_unknown_bytes() or
 wtap_file_read_expected_bytes() from an open routine - open routines are
 supposed to return -1 on error, 0 if the file doesn't appear to be a
 file of the specified type, or 1 if the file does appear to be a file of
 the specified type, but those macros will cause the caller to return
 FALSE on errors (so that, even if there's an I/O error, it reports "the
 file isn't a file of the specified type" rather than "we got an error
 trying to read the file").
 
 When doing reads in an open routine before we've concluded that the file
 is probably of the right type, return 0, rather than -1, if we get
 WTAP_ERR_SHORT_READ - if we don't have enough data to check whether a
 file is of a given type, we should keep trying other types, not give up.
 For reads done *after* we've concluded the file is probably of the right
 type, if a read doesn't return the number of bytes we asked for, but
 returns an error of 0, return WTAP_ERR_SHORT_READ - the file is
 apparently cut short.
 
 For NetMon and NetXRay/Windows Sniffer files, use a #define for the
 magic number size, and use that for both magic numbers.

Directory: /trunk/wiretap/
  Changes    Path                     Action
  +4 -4      5views.c                 Modified
  +4 -4      aethra.c                 Modified
  +5 -7      ascendtext.c             Modified
  +3 -1      ber.c                    Modified
  +4 -4      btsnoop.c                Modified
  +3 -5      commview.c               Modified
  +15 -20    cosine.c                 Modified
  +7 -10     csids.c                  Modified
  +13 -3     daintree-sna.c           Modified
  +2 -3      dbs-etherwatch.c         Modified
  +12 -36    dct3trace.c              Modified


(32 files not shown)