* ppp: transition to dead when read io destroyed
@ 2010-04-29 18:03 Kristen Carlson Accardi
2010-04-29 19:26 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Kristen Carlson Accardi @ 2010-04-29 18:03 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1526 bytes --]
remove call to signal_close for lcp object, it is redundent. If
our io is destroyed we are dead, so transition the ppp phase to
DEAD so our disconnect callback can be called.
---
gatchat/gatppp.c | 2 +-
gatchat/ppp_cp.c | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index dfdaf40..3450ce3 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -180,7 +180,6 @@ void ppp_enter_phase(GAtPPP *ppp, enum ppp_phase phase)
case PPP_PHASE_TERMINATION:
pppcp_signal_down(ppp->ipcp);
pppcp_signal_close(ppp->ipcp);
- pppcp_signal_close(ppp->lcp);
break;
case PPP_PHASE_DEAD:
ppp_dead(ppp);
@@ -269,6 +268,7 @@ static void io_disconnect(gpointer user_data)
GAtPPP *ppp = user_data;
pppcp_signal_down(ppp->lcp);
+ ppp_enter_phase(ppp, PPP_PHASE_DEAD);
}
/* Administrative Open */
diff --git a/gatchat/ppp_cp.c b/gatchat/ppp_cp.c
index 9db96d6..00acb73 100644
--- a/gatchat/ppp_cp.c
+++ b/gatchat/ppp_cp.c
@@ -523,6 +523,7 @@ static void pppcp_send_terminate_ack(struct pppcp_data *data,
{
struct pppcp_packet *packet;
struct pppcp_packet *pppcp_header = (struct pppcp_packet *) request;
+ struct pppcp_timer_data *timer_data = &data->terminate_timer_data;
pppcp_trace(data);
@@ -535,6 +536,7 @@ static void pppcp_send_terminate_ack(struct pppcp_data *data,
ntohs(pppcp_header->length));
pppcp_packet_free(packet);
+ pppcp_start_timer(timer_data);
}
/*
--
1.6.6.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-29 19:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-29 18:03 ppp: transition to dead when read io destroyed Kristen Carlson Accardi
2010-04-29 19:26 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.