Ethereal-dev: [Ethereal-dev] Assertion failure from GTK

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

From: Pasi Eronen <pasi.eronen@xxxxxxxx>
Date: Tue, 23 Apr 2002 13:07:15 +0300 (EET DST
Hi,

It seems that if the capture file grows while Ethereal is reading it
(e.g., I'm running tcpdump in the background and use Ethereal
to check what's going on), Gtk complains about the progress bar:

  Gtk-CRITICAL **: file gtkprogress.c: line 518 (gtk_progress_set_percentage):
  assertion `percentage >= 0 && percentage <= 1.0' failed.

The following patch fixes this.

Best regards,
Pasi

-- 
Pasi Eronen                         E-mail pasi.eronen@xxxxxxxx
Nixu Oy                             Tel +358 50 5123499
M�kel�nkatu 91, 00610 Helsinki      Fax +358 9 4781030

-----------------------------------------------------------------------------

*** file.c.orig	Tue Apr 23 12:21:25 2002
--- file.c	Tue Apr 23 13:03:13 2002
***************
*** 355,358 ****
--- 355,361 ----
          file_pos = lseek(cf->filed, 0, SEEK_CUR);
          prog_val = (gfloat) file_pos / (gfloat) cf->f_len;
+         /* The file is growing while we are reading it */
+         if (prog_val > 1.0)
+             prog_val = 1.0;
          update_progress_dlg(progbar, prog_val);
          cf->progbar_nextstep += cf->progbar_quantum;



-- 
This message has been 'sanitized'.  This means that potentially
dangerous content has been rewritten or removed.  The following
log describes which actions were taken.

Sanitizer (start="1019556452"):
  Split unusually long Date: header.
  SanitizeFile (filename="unnamed.txt", mimetype="TEXT/PLAIN"):
    Match (rule="2"):
      Enforced policy: accept

  Total modifications so far: 1


Anomy 0.0.0 : Sanitizer.pm
$Id: Sanitizer.pm,v 1.32 2001/10/11 19:27:15 bre Exp $