summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gatchat/ppp.c1
-rw-r--r--gatchat/ppp.h1
-rw-r--r--gatchat/ppp_auth.c2
-rw-r--r--gatchat/ppp_cp.c9
-rw-r--r--gatchat/ppp_lcp.c13
5 files changed, 15 insertions, 11 deletions
diff --git a/gatchat/ppp.c b/gatchat/ppp.c
index a9972d4a..46129765 100644
--- a/gatchat/ppp.c
+++ b/gatchat/ppp.c
@@ -409,7 +409,6 @@ static void ppp_transition_phase(GAtPPP *ppp, enum ppp_phase phase)
ppp_network(ppp);
break;
}
-
}
static void ppp_handle_event(GAtPPP *ppp)
diff --git a/gatchat/ppp.h b/gatchat/ppp.h
index b6797f5e..9902551c 100644
--- a/gatchat/ppp.h
+++ b/gatchat/ppp.h
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
+
#include "ppp_cp.h"
#define DEFAULT_MRU 1500
diff --git a/gatchat/ppp_auth.c b/gatchat/ppp_auth.c
index c23d9ad5..d6181129 100644
--- a/gatchat/ppp_auth.c
+++ b/gatchat/ppp_auth.c
@@ -153,7 +153,7 @@ static void chap_process_packet(gpointer priv, guint8 *new_packet)
chap_process_failure(data, new_packet);
break;
default:
- g_print("unknown auth code\n");
+ g_print("Unknown auth code\n");
break;
}
}
diff --git a/gatchat/ppp_cp.c b/gatchat/ppp_cp.c
index ac1f6e64..ab10bba3 100644
--- a/gatchat/ppp_cp.c
+++ b/gatchat/ppp_cp.c
@@ -30,6 +30,7 @@
#include <termios.h>
#include <glib.h>
#include <arpa/inet.h>
+
#include "gatppp.h"
#include "ppp.h"
@@ -95,6 +96,7 @@ static gboolean pppcp_timeout(gpointer user_data)
pppcp_generate_event(data, TO_PLUS, NULL, 0);
else
pppcp_generate_event(data, TO_MINUS, NULL, 0);
+
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)
{
- return prev_identifier+1;
+ return prev_identifier + 1;
}
static void get_option_length(gpointer data, gpointer user_data)
@@ -1413,10 +1415,11 @@ void pppcp_process_packet(gpointer priv, guint8 *new_packet)
return;
/* 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;
- } else
+ else
event_type = data->packet_ops[packet->code-1](data, packet);
+
if (event_type) {
data_len = ntohs(packet->length);
event_data = packet;
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index 644842a4..0892b2c9 100644
--- a/gatchat/ppp_lcp.c
+++ b/gatchat/ppp_lcp.c
@@ -30,16 +30,17 @@
#include <termios.h>
#include <glib.h>
#include <arpa/inet.h>
+
#include "gatppp.h"
#include "ppp.h"
enum lcp_options {
- RESERVED = 0,
- MRU = 1,
- ACCM = 2,
- AUTH_PROTO = 3,
- QUAL_PROTO = 4,
- MAGIC_NUMBER = 5,
+ RESERVED = 0,
+ MRU = 1,
+ ACCM = 2,
+ AUTH_PROTO = 3,
+ QUAL_PROTO = 4,
+ MAGIC_NUMBER = 5,
DEPRECATED_QUAL_PROTO = 6,
PFC = 7,
ACFC = 8,