Some additional whitespace cleanup for PPP code

This commit is contained in:
Marcel Holtmann 2010-03-22 20:01:28 -07:00
parent 8667c8694d
commit 91b742730a
5 changed files with 15 additions and 11 deletions

View File

@ -409,7 +409,6 @@ static void ppp_transition_phase(GAtPPP *ppp, enum ppp_phase phase)
ppp_network(ppp); ppp_network(ppp);
break; break;
} }
} }
static void ppp_handle_event(GAtPPP *ppp) static void ppp_handle_event(GAtPPP *ppp)

View File

@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* *
*/ */
#include "ppp_cp.h" #include "ppp_cp.h"
#define DEFAULT_MRU 1500 #define DEFAULT_MRU 1500

View File

@ -153,7 +153,7 @@ static void chap_process_packet(gpointer priv, guint8 *new_packet)
chap_process_failure(data, new_packet); chap_process_failure(data, new_packet);
break; break;
default: default:
g_print("unknown auth code\n"); g_print("Unknown auth code\n");
break; break;
} }
} }

View File

@ -30,6 +30,7 @@
#include <termios.h> #include <termios.h>
#include <glib.h> #include <glib.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include "gatppp.h" #include "gatppp.h"
#include "ppp.h" #include "ppp.h"
@ -95,6 +96,7 @@ static gboolean pppcp_timeout(gpointer user_data)
pppcp_generate_event(data, TO_PLUS, NULL, 0); pppcp_generate_event(data, TO_PLUS, NULL, 0);
else else
pppcp_generate_event(data, TO_MINUS, NULL, 0); pppcp_generate_event(data, TO_MINUS, NULL, 0);
return FALSE; return FALSE;
} }
@ -224,7 +226,7 @@ static void pppcp_zero_restart_count(struct pppcp_data *data)
*/ */
static guint8 new_identity(struct pppcp_data *data, guint prev_identifier) static guint8 new_identity(struct pppcp_data *data, guint prev_identifier)
{ {
return prev_identifier+1; return prev_identifier + 1;
} }
static void get_option_length(gpointer data, gpointer user_data) static void get_option_length(gpointer data, gpointer user_data)
@ -1413,10 +1415,11 @@ void pppcp_process_packet(gpointer priv, guint8 *new_packet)
return; return;
/* check flags to see if we support this code */ /* check flags to see if we support this code */
if (!(data->valid_codes & (1 << packet->code))) { if (!(data->valid_codes & (1 << packet->code)))
event_type = RUC; event_type = RUC;
} else else
event_type = data->packet_ops[packet->code-1](data, packet); event_type = data->packet_ops[packet->code-1](data, packet);
if (event_type) { if (event_type) {
data_len = ntohs(packet->length); data_len = ntohs(packet->length);
event_data = packet; event_data = packet;

View File

@ -30,6 +30,7 @@
#include <termios.h> #include <termios.h>
#include <glib.h> #include <glib.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include "gatppp.h" #include "gatppp.h"
#include "ppp.h" #include "ppp.h"