From 87340d64e2bd8b783f5bc434be8a4300fcf109a8 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 28 Apr 2010 15:29:55 -0500 Subject: [PATCH] ppp: Make ppp_chap_process_packet const correct --- gatchat/ppp.h | 2 +- gatchat/ppp_auth.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gatchat/ppp.h b/gatchat/ppp.h index 9f68e5b9..01092965 100644 --- a/gatchat/ppp.h +++ b/gatchat/ppp.h @@ -96,7 +96,7 @@ void ipcp_free(struct pppcp_data *data); /* CHAP related functions */ struct ppp_chap *ppp_chap_new(GAtPPP *ppp, guint8 method); void ppp_chap_free(struct ppp_chap *chap); -void ppp_chap_process_packet(struct ppp_chap *chap, guint8 *new_packet); +void ppp_chap_process_packet(struct ppp_chap *chap, const guint8 *new_packet); /* TUN / Network related functions */ struct ppp_net *ppp_net_new(GAtPPP *ppp); diff --git a/gatchat/ppp_auth.c b/gatchat/ppp_auth.c index 57203ab6..6e55297c 100644 --- a/gatchat/ppp_auth.c +++ b/gatchat/ppp_auth.c @@ -54,9 +54,9 @@ enum chap_code { FAILURE }; -static void chap_process_challenge(struct ppp_chap *chap, guint8 *packet) +static void chap_process_challenge(struct ppp_chap *chap, const guint8 *packet) { - struct chap_header *header = (struct chap_header *) packet; + const struct chap_header *header = (const struct chap_header *) packet; struct chap_header *response; GChecksum *checksum; const char *secret = g_at_ppp_get_password(chap->ppp); @@ -111,7 +111,7 @@ challenge_out: /* * parse the packet */ -void ppp_chap_process_packet(struct ppp_chap *chap, guint8 *new_packet) +void ppp_chap_process_packet(struct ppp_chap *chap, const guint8 *new_packet) { guint8 code = new_packet[0];