Debian Bug report logs - #418905
dialog: timeout problem

version graph

Package: dialog; Maintainer for dialog is Santiago Vila <sanvila@debian.org>; Source for dialog is src:dialog.

Reported by: Benoit Panizzon <bp@imp.ch>

Date: Thu, 12 Apr 2007 17:00:01 UTC

Severity: normal

Tags: patch

Fixed in version dialog/1.1-20070514-1

Done: Santiago Vila <sanvila@debian.org>

Bug is archived. No further changes may be made.

Forwarded to Thomas Dickey <dickey@his.com>

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Arnaud Fontaine <arnaud@andesi.org>:
Bug#418905; Package netenv. Full text and rfc822 format available.

Acknowledgement sent to Benoit Panizzon <bp@imp.ch>:
New Bug report received and forwarded. Copy sent to Arnaud Fontaine <arnaud@andesi.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Benoit Panizzon <bp@imp.ch>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: netenv: NETENV_TIMEOUT not respected anymore
Date: Thu, 12 Apr 2007 18:52:16 +0200
Package: netenv
Version: 0.94.3-21
Severity: normal


NETENV_TIMEOUT in /etc/netenv/netenv.conf does not seam to be respected anymore since on of the last updates.
This is a bit problematic if you remotely boot a machine.

-Benoit-

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (700, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.18.1 (SMP w/1 CPU core)
Locale: LANG=de_CH, LC_CTYPE=de_CH (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages netenv depends on:
ii  coreutils                 5.97-5.3       The GNU core utilities
ii  debconf [debconf-2.0]     1.5.13         Debian configuration management sy
ii  dialog                    1.1-20070409-1 Displays user-friendly dialog boxe

netenv recommends no packages.

-- debconf information:
  netenv/info_pcmcia:
  netenv/twoconfs:
* netenv/is_configured0: true
  netenv/auto_method:
  netenv/info_interfaces:
* netenv/showagain: false
* netenv/noconf:
  netenv/auto_configure: Disable for now



Bug reassigned from package `netenv' to `dialog'. Request was from Arnaud Fontaine <arnaud@andesi.org> to control@bugs.debian.org. (Wed, 02 May 2007 23:03:02 GMT) Full text and rfc822 format available.

Message sent on to Benoit Panizzon <bp@imp.ch>:
Bug#418905. Full text and rfc822 format available.

Message #10 received at 418905-submitter@bugs.debian.org (full text, mbox):

From: Arnaud Fontaine <arnaud@andesi.org>
To: 418905-submitter@bugs.debian.org, Santiago Vila <sanvila@debian.org>
Cc: control@bugs.debian.org
Subject: Re: netenv: NETENV_TIMEOUT not respected anymore
Date: Thu, 03 May 2007 01:00:48 +0200
[Message part 1 (text/plain, inline)]
reassign 418905 dialog
thanks

Hello,

This  problem doesn't  actually comes  from netenv  but from  dialog. It
seems to be a regression  which happens between version 1.0-20060221 and
1.1-20070227 of dialog:

(line 219 of ui_getc.c)

             code = wget_wch(win, &my_wint);
             my_wchar = my_wint;
             switch (code) {
              case KEY_CODE_YES:
                 ch = *fkey = my_wchar;
                 last_getc = my_wchar;
                 break;
              case OK:
                 memset(&state, 0, sizeof(state));
                 have_last_getc = wcrtomb(last_getc_bytes, my_wchar, &state);
                 if (have_last_getc < 0) {
                   have_last_getc = used_last_getc = 0;
                   last_getc_bytes[0] = my_wchar;
                }
                ch = CharOf(last_getc_bytes[used_last_getc++]);
                last_getc = my_wchar;
                break;
            case ERR:
-               ch = ERR;
-               last_getc = ERR;
-               break;
+               napms(50);
+               continue;
            default:
                break;
            }

As value of  ``code'' variable never changes in case  of ERR is returned
by wget_wch,  it will loop forever. Replacing  ``continue'' by ``break''
seems  to fix  the  issue, however  I  don't really  understand why  the
upstream author put  napms there. Therefore my idea  is certainly wrong,
any idea?

Regards,
Arnaud Fontaine
[Message part 2 (application/pgp-signature, inline)]

Message sent on to Benoit Panizzon <bp@imp.ch>:
Bug#418905. Full text and rfc822 format available.

Message #13 received at 418905-submitter@bugs.debian.org (full text, mbox):

From: Arnaud Fontaine <arnaud@andesi.org>
To: 418905-submitter@bugs.debian.org, Santiago Vila <sanvila@debian.org>
Subject: Re: netenv: NETENV_TIMEOUT not respected anymore
Date: Thu, 03 May 2007 02:28:37 +0200
[Message part 1 (text/plain, inline)]
Hello,

Indeed, I was totally wrong  in my previous mail, ``wget_wch()'' returns
ERR in no-delay  mode when no input is waiting,  but the uptsream author
doesn't check for timeout in this case.

I have attached a patch which  fixes this problem and seems to work fine
(with netenv  or by using ``dialog  --timeout 5 --menu "Title"  20 68 12
foo bar''). Thanks to Manuel Menal for his review ;).

Regards,
Arnaud

[dialog_timeout.patch (text/x-diff, attachment)]
[Message part 3 (application/pgp-signature, inline)]

Tags added: patch Request was from Arnaud Fontaine <arnaud@andesi.org> to control@bugs.debian.org. (Thu, 03 May 2007 08:27:01 GMT) Full text and rfc822 format available.

Reply sent to Santiago Vila <sanvila@unex.es>:
You have marked Bug as forwarded. Full text and rfc822 format available.

Message #18 received at 418905-forwarded@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@unex.es>
To: Thomas Dickey <dickey@his.com>
Cc: 418905-forwarded@bugs.debian.org, Benoit Panizzon <bp@imp.ch>, Arnaud Fontaine <arnaud@andesi.org>
Subject: Bug#418905: timeout problem
Date: Mon, 14 May 2007 11:31:56 +0200 (CEST)
Hello. This bug was initially submitted against netenv, but it happened
to be a bug in dialog, so it was reassigned. The complete details
are at http://bugs.debian.org/418905 but the following mail
has a fix and a way to reproduce it, so it might be enough:

---------- Forwarded message ----------
From: Arnaud Fontaine <arnaud@andesi.org>
Date: Thu, 03 May 2007 02:28:37 +0200
Subject: Re: netenv: NETENV_TIMEOUT not respected anymore

Hello,

Indeed, I was totally wrong  in my previous mail, ``wget_wch()'' returns
ERR in no-delay  mode when no input is waiting,  but the uptsream author
doesn't check for timeout in this case.

I have attached a patch which  fixes this problem and seems to work fine
(with netenv  or by using ``dialog  --timeout 5 --menu "Title"  20 68 12
foo bar''). Thanks to Manuel Menal for his review ;).

Regards,
Arnaud

--

--- ui_getc.c.old       2007-05-03 02:03:56.000000000 +0200
+++ ui_getc.c   2007-05-03 02:03:58.000000000 +0200
@@ -234,6 +234,13 @@
                last_getc = my_wchar;
                break;
            case ERR:
+               current = time((time_t *) 0);
+
+               if (interval > 0
+                   && current >= expired) {
+                 dlg_exiterr("timeout");
+               }
+
                napms(50);
                continue;
            default:



Changed Bug title to dialog: timeout problem from netenv: NETENV_TIMEOUT not respected anymore. Request was from Santiago Vila <sanvila@unex.es> to control@bugs.debian.org. (Mon, 14 May 2007 09:36:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Santiago Vila <sanvila@debian.org>:
Bug#418905; Package dialog. Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Santiago Vila <sanvila@debian.org>. Full text and rfc822 format available.

Message #25 received at 418905@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: Santiago Vila <sanvila@unex.es>
Cc: 418905@bugs.debian.org, Benoit Panizzon <bp@imp.ch>, Arnaud Fontaine <arnaud@andesi.org>
Subject: Re: Bug#418905: timeout problem
Date: Mon, 14 May 2007 06:18:34 -0400 (EDT)
On Mon, 14 May 2007, Santiago Vila wrote:

> Hello. This bug was initially submitted against netenv, but it happened
> to be a bug in dialog, so it was reassigned. The complete details
> are at http://bugs.debian.org/418905 but the following mail
> has a fix and a way to reproduce it, so it might be enough:

it looks ok - that's essentially what I've done further down in the 
function.

>
> ---------- Forwarded message ----------
> From: Arnaud Fontaine <arnaud@andesi.org>
> Date: Thu, 03 May 2007 02:28:37 +0200
> Subject: Re: netenv: NETENV_TIMEOUT not respected anymore
>
> Hello,
>
> Indeed, I was totally wrong  in my previous mail, ``wget_wch()'' returns
> ERR in no-delay  mode when no input is waiting,  but the uptsream author
> doesn't check for timeout in this case.
>
> I have attached a patch which  fixes this problem and seems to work fine
> (with netenv  or by using ``dialog  --timeout 5 --menu "Title"  20 68 12
> foo bar''). Thanks to Manuel Menal for his review ;).
>
> Regards,
> Arnaud
>
> --
>
> --- ui_getc.c.old       2007-05-03 02:03:56.000000000 +0200
> +++ ui_getc.c   2007-05-03 02:03:58.000000000 +0200
> @@ -234,6 +234,13 @@
>                last_getc = my_wchar;
>                break;
>            case ERR:
> +               current = time((time_t *) 0);
> +
> +               if (interval > 0
> +                   && current >= expired) {
> +                 dlg_exiterr("timeout");
> +               }
> +
>                napms(50);
>                continue;
>            default:
>

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Reply sent to Santiago Vila <sanvila@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Benoit Panizzon <bp@imp.ch>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #30 received at 418905-close@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@debian.org>
To: 418905-close@bugs.debian.org
Subject: Bug#418905: fixed in dialog 1.1-20070514-1
Date: Tue, 15 May 2007 12:32:05 +0000
Source: dialog
Source-Version: 1.1-20070514-1

We believe that the bug you reported is fixed in the latest version of
dialog, which is due to be installed in the Debian FTP archive:

dialog_1.1-20070514-1.diff.gz
  to pool/main/d/dialog/dialog_1.1-20070514-1.diff.gz
dialog_1.1-20070514-1.dsc
  to pool/main/d/dialog/dialog_1.1-20070514-1.dsc
dialog_1.1-20070514-1_powerpc.deb
  to pool/main/d/dialog/dialog_1.1-20070514-1_powerpc.deb
dialog_1.1-20070514.orig.tar.gz
  to pool/main/d/dialog/dialog_1.1-20070514.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 418905@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Santiago Vila <sanvila@debian.org> (supplier of updated dialog package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 15 May 2007 14:11:00 +0200
Source: dialog
Binary: dialog
Architecture: source powerpc
Version: 1.1-20070514-1
Distribution: unstable
Urgency: low
Maintainer: Santiago Vila <sanvila@debian.org>
Changed-By: Santiago Vila <sanvila@debian.org>
Description: 
 dialog     - Displays user-friendly dialog boxes from shell scripts
Closes: 418905 423732
Changes: 
 dialog (1.1-20070514-1) unstable; urgency=low
 .
   * New upstream release.
   * Fixed timeout regression (Closes: #418905).
   * Fixed tailbox regression (Closes: #423732).
Files: 
 44338aa3224367f0f5d671b7b4427d84 593 misc optional dialog_1.1-20070514-1.dsc
 1a5dd79088ac3ba3047b48e7efaea8d1 365832 misc optional dialog_1.1-20070514.orig.tar.gz
 3952d8738a186721eb02a9aff8341080 8876 misc optional dialog_1.1-20070514-1.diff.gz
 68af9d4389661324d7e73e3716b0881e 259570 misc optional dialog_1.1-20070514-1_powerpc.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGSaShd9Uuvj7yPNYRAsEFAKCwWE6XndZ8chfL0E69gPmNqc+JmQCePSGa
wZrTTTgF9NOkrZLWSwL5zcc=
=TrFD
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 24 Jun 2007 11:10:30 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 11:12:27 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.