diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-04-28 15:29:55 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-28 17:27:35 -0500 |
commit | 87340d64e2bd8b783f5bc434be8a4300fcf109a8 (patch) | |
tree | c5035074dd8cb24e25e0b7123887357888afcf58 | |
parent | 955673573b1ff657e89daa5f1e60a20737f6a7a2 (diff) | |
download | ofono-87340d64e2bd8b783f5bc434be8a4300fcf109a8.tar.bz2 |
ppp: Make ppp_chap_process_packet const correct
-rw-r--r-- | gatchat/ppp.h | 2 | ||||
-rw-r--r-- | 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]; |