Bug 17959 - kppp prints a strange error message
Summary: kppp prints a strange error message
Status: RESOLVED DUPLICATE of bug 72032
Alias: None
Product: kppp
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: unspecified Other
: NOR normal
Target Milestone: ---
Assignee: Harri Porten
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-01-01 20:03 UTC by Root
Modified: 2004-01-07 05:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Root 2001-01-01 20:00:44 UTC
(*** This bug was imported into bugs.kde.org ***)

Package: kppp
Version: 2.0.1

Hello

first I wish you all a Happy New Year 2001.

I have realized the following problem with kppp using the Lucent
Winmodem
of my DELL Inspirion 5000e laptop (600MHz Redhat Linux 7.0 Linux
2.2.16).
The driver ltmodem-5.78c is from
http://walbran.org/sean/linux/stodolsk/.
kppp is working correctly but I get a strange error message:

  # kppp
  Kernel supports ppp alright.
  Couldn't find interface ppp0:  ë@HÃ

I have built my own kppp from kdenetwork-2.0.1.tar.bz2. You can find a
complete debug log at the end of this mail. The error message comes out 
of the function kppp/pppstats.cpp/PPPStats::ifIsUp():


    if(ioctl(s SIOCGIFFLAGS (caddr_t) &ifr) < 0) {
        // MY DEBUG MESSAGE --------------------------------
        fprintf(stderr"errno=%d strerror=%s sys_nerr=%d\n"
                errno strerror(errno) sys_nerr);
// -------------------------------------------------
        if (sys_nerr)
          fprintf(stderr "Couldn't find interface %s: %s\n"
                  unitName sys_errlist[sys_nerr]);
        ::close(s);
        s = 0;
        return 0;
    }

I think the use of sys_nerr and sys_errlist is not appropriate; errno
and 
strerror() should be used instead. I have added MY DEBUG MESSAGE which 
lists:

  errno=19 strerror=No such device sys_nerr=125
  Couldn't find interface ppp0: ë@(Ã

The error message "No such device" seems more resonable even if I do 
not understand why the ioctl call fails at all (it succceeds sometime
later).

In the hope it's useful.

Ciao Wolfgang.


# ./kppp
kppp: helperPid: 22845
kppp: sendRequest: trying to send msg type 6
kppp: sendRequest: sent message
kppp: recvResponse(): waiting for message
kppp: recvResponse(): received message
kppp: response.status: 0
kppp: sendRequest: trying to send msg type 2
kppp: sendRequest: sent message
kppp: response.status: 0
kppp: Locking Device: 0000022844
kppp:
kppp: sendRequest: trying to send msg type 1
kppp: sendRequest: sent message
kppp: response.status: 0
kppp: QSocketNotifier started!
kppp: AcctEnabled: false
kppp: End of script
kppp: QSocketNotifier stopped!
kppp: started if timeout timer with 30000
kppp: sendRequest: trying to send msg type 9
kppp: sendRequest: sent message
kppp: recvResponse(): waiting for message
kppp: recvResponse(): received message
kppp: response.status: 1
kppp: execppp() returned with return-code 1
kppp: sendRequest: trying to send msg type 4
kppp: sendRequest: sent message
kppp: response.status: 0
kppp: sendRequest: trying to send msg type 4
kppp: sendRequest: sent message
kppp: response.status: 0
kppp: sendRequest: trying to send msg type 4
kppp: sendRequest: sent message
kppp: response.status: 0
errno=19 strerror=No such device sys_nerr=125
Couldn't find interface ppp0: ë@(Ã
errno=19 strerror=No such device sys_nerr=125
Couldn't find interface ppp0: ë@(Ã
Kernel supports ppp alright.
kppp: Interface is down
kppp: Interface is down
kppp: Interface is down
kppp: Interface is down
kppp: Interface is down
kppp: Interface is down
kppp: Interface is down
kppp: Interface is down
kppp: Interface is down
kppp: Interface is down
kppp: Interface is up
kppp: Local IP: 62.202.54.17
kppp: Remote IP: 62.202.54.1
kppp: sendRequest: trying to send msg type 7
kppp: sendRequest: sent message
kppp: recvResponse(): waiting for message
kppp: recvResponse(): received message
kppp: response.status: 0
kppp: Modem reported result string: CONNECT 33600 V42bis
kppp:
kppp: The parsed result is: 33600
kppp: Local IP: 62.202.54.17
kppp: Remote IP: 62.202.54.1
kppp: sendRequest: trying to send msg type 10
kppp: sendRequest: sent message
kppp: recvResponse(): waiting for message
kppp: recvResponse(): received message
kppp: response.status: 1
kppp: sendRequest: trying to send msg type 7
kppp: sendRequest: sent message
kppp: recvResponse(): waiting for message
kppp: recvResponse(): received message
kppp: response.status: 1
kppp: sendRequest: trying to send msg type 4
kppp: sendRequest: sent message
kppp: response.status: 0
kppp: sendRequest: trying to send msg type 4
kppp: sendRequest: sent message
kppp: response.status: 0
kppp: UnLocking Modem Device
kppp: sendRequest: trying to send msg type 3
kppp: sendRequest: sent message
kppp: recvResponse(): waiting for message
kppp: recvResponse(): received message
kppp: response.status: 0
kppp: Received a
SIGUSR1
Comment 1 Harri Porten 2001-01-07 17:11:33 UTC
> kppp is working correctly but I get a strange error message:
> 
>   # kppp
>   Kernel supports ppp alright.
>   Couldn't find interface ppp0:  ë@HÃ
> 
> I have built my own kppp from kdenetwork-2.0.1.tar.bz2. You can find a
> complete debug log at the end of this mail. The error message comes out 
> of the function kppp/pppstats.cpp/PPPStats::ifIsUp():
> 
> 
>     if(ioctl(s SIOCGIFFLAGS (caddr_t) &ifr) < 0) {
>         // MY DEBUG MESSAGE --------------------------------
>         fprintf(stderr"errno=%d strerror=%s sys_nerr=%d\n"
>                 errno strerror(errno) sys_nerr);
>         // -------------------------------------------------
>         if (sys_nerr)
>           fprintf(stderr "Couldn't find interface %s: %s\n"
>                   unitName sys_errlist[sys_nerr]);
>         ::close(s);
>         s = 0;
>         return 0;
>     }
> 
> I think the use of sys_nerr and sys_errlist is not appropriate; errno
> and 
> strerror() should be used instead.

You are right. I don't know why I used those and have fixed this issue
yesterday. By coincidence I got a similar report via private mail
yesterday.

Thanks

Harri.
Comment 2 James Richard Tyrer 2004-01-07 05:07:44 UTC
I don't think that this should have been closed.

The problem still occurs in HEAD.  See Bug #72032

--
JRT
Comment 3 James Richard Tyrer 2004-01-07 05:09:15 UTC
Duplicate.  See new Bug for more detail of error message.

--
JRT

*** This bug has been marked as a duplicate of 72032 ***