linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: linux-ppp@vger.kernel.org
Subject: Re: wrong return code in pppd 2.4.5
Date: Thu, 11 Mar 2010 16:04:17 +0000	[thread overview]
Message-ID: <4B991481.5010302@bfs.de> (raw)
In-Reply-To: <4B73C880.2040100@bfs.de>



Paul Mackerras schrieb:
> On Sat, Mar 06, 2010 at 12:33:21PM +0100, walter harms wrote:
> 
>> I took a look into the code but i did not find WHY this is happening.
>> Since 2.4.4 returned the correct value someone familar with the changes should
>> find it more easy.
> 
> I don't see any changes between 2.4.4 and 2.4.5 that would affect
> this.  I suspect it's a race condition.
> 
>> An yes the modem is connected to the serial port, nothing special. if a patch is
>> available i can test it.
> 
> Try the below.
> 
> Paul.
> 
> diff --git a/pppd/main.c b/pppd/main.c
> index 014d614..4236050 100644
> --- a/pppd/main.c
> +++ b/pppd/main.c
> @@ -1041,7 +1041,8 @@ get_input()
>  	}
>  	notice("Modem hangup");
>  	hungup = 1;
> -	status = EXIT_HANGUP;
> +	if (!(phase = PHASE_TERMINATE || phase = PHASE_DISCONNECT))
> +	    status = EXIT_HANGUP;
>  	lcp_lowerdown(0);	/* serial link is no longer available */
>  	link_terminated(0);
>  	return;
> 

It seems that this did not help:

Terminating connection due to lack of activity.      <-------
Connect time 0.6 minutes.
Sent 137 bytes, received 185 bytes.
Script /etc/ppp/ip-down started (pid 918)
sent [LCP TermReq id=0x2 "Link inactive"]
Script /etc/ppp/ip-down finished (pid 918), status = 0x0
sent [LCP TermReq id=0x3 "Link inactive"]
Connection terminated.
Modem hangup
pppd return value 16                <-----


sorry for the delay we had serious phone problems, someone stole the cable (*twice*)

re,
 wh

      parent reply	other threads:[~2010-03-11 16:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11  9:06 wrong return code in pppd 2.4.5 walter harms
2010-02-24  9:02 ` walter harms
2010-03-06  7:08 ` Paul Mackerras
2010-03-06 11:33 ` walter harms
2010-03-07  4:25 ` Paul Mackerras
2010-03-11 16:04 ` walter harms [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B991481.5010302@bfs.de \
    --to=wharms@bfs.de \
    --cc=linux-ppp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).