Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal file.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 2 Jan 2000 21:46:43 -0600 (CST)
guy         2000/01/02 21:46:40 CST

  Modified files:
    .                    file.c 
  Log:
  Fix a nasty side-effect of running the packet list in
  GTK_SELECTION_BROWSE mode - that mode apparently always arranges that
  there is (in a non-empty GtkCList) one row selected, which means that
  when the first row is added, it selects it.
  
  Unfortunately, that causes a "select-row" signal to be emitted, which
  causes "select_packet()" to be called - but we haven't yet set "fd->row"
  for the frame we're adding, so "select_packet()" can't find the frame
  for the row being selected, and it aborts.
  
  This causes a core dump when the first packet arrives during an "Update
  list of packets in real time" capture.
  
  For now, we handle this by, if we don't find the frame with the given
  row number, checking that there's exactly one frame in our list of
  frames and, if so, saying that frame is the frame for which we're
  looking.
  
  Revision  Changes    Path
  1.144     +28 -4     ethereal/file.c