diff options
| author | Denis Kenzior <denkenz@gmail.com> | 2010-04-13 14:00:01 -0500 | 
|---|---|---|
| committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-13 14:00:01 -0500 | 
| commit | 552db428ef06f1dfd650bcb549dda93a743640eb (patch) | |
| tree | 95d263c5a9f2abc23ea300441e3bcd0212a8a496 /gatchat | |
| parent | 9116b7e8f8ad4576b0c7456d1911f1c490d76754 (diff) | |
| download | ofono-552db428ef06f1dfd650bcb549dda93a743640eb.tar.bz2 | |
ppp: Refactor how tls/tlu/tld/tlf are used
With the upper layer driving these, the special handling is no longer
required.
Diffstat (limited to 'gatchat')
| -rw-r--r-- | gatchat/ppp_cp.c | 19 | 
1 files changed, 6 insertions, 13 deletions
diff --git a/gatchat/ppp_cp.c b/gatchat/ppp_cp.c index 6d088ebf..8cbb64f4 100644 --- a/gatchat/ppp_cp.c +++ b/gatchat/ppp_cp.c @@ -640,12 +640,6 @@ static void pppcp_generate_event(struct pppcp_data *data,  	if (actions & INV)  		goto error; -	if (actions & TLD) -		pppcp_this_layer_down(data); - -	if (actions & TLF) -		pppcp_this_layer_finished(data); -  	if (actions & IRC) {  		struct pppcp_timer_data *timer_data; @@ -677,17 +671,16 @@ static void pppcp_generate_event(struct pppcp_data *data,  	if (actions & SER)  		pppcp_send_echo_reply(data, packet); -	if (actions & TLU) -		pppcp_this_layer_up(data); -  	pppcp_transition_state(new_state, data); -	/* -	 * The logic elsewhere generates the UP events when this is -	 * signaled.  So we must call this last -	 */  	if (actions & TLS)  		pppcp_this_layer_started(data); +	else if (actions & TLU) +		pppcp_this_layer_up(data); +	else if (actions & TLD) +		pppcp_this_layer_down(data); +	else if (actions & TLF) +		pppcp_this_layer_finished(data);  	return;  |