summaryrefslogtreecommitdiffstats
path: root/gatchat/ppp_auth.c
diff options
context:
space:
mode:
authorKristen Carlson Accardi <kristen@linux.intel.com>2010-05-13 10:31:32 -0700
committerDenis Kenzior <denkenz@gmail.com>2010-05-19 02:58:45 -0500
commit3fff4c49c8de500a6355e012c7246890368b2cb7 (patch)
treedcc11fd6608fad5ac80c14af92125364ccd458e9 /gatchat/ppp_auth.c
parent0d8b86ed79ff6f12d35c5c155e858e3c174af34b (diff)
downloadofono-3fff4c49c8de500a6355e012c7246890368b2cb7.tar.bz2
ppp: implement ppp_packet_new
Diffstat (limited to 'gatchat/ppp_auth.c')
-rw-r--r--gatchat/ppp_auth.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gatchat/ppp_auth.c b/gatchat/ppp_auth.c
index eae5d17a..d26b764e 100644
--- a/gatchat/ppp_auth.c
+++ b/gatchat/ppp_auth.c
@@ -83,12 +83,10 @@ static void chap_process_challenge(struct ppp_chap *chap, const guint8 *packet)
*/
digest_len = g_checksum_type_get_length(chap->method);
response_length = digest_len + sizeof(*header) + 1;
- ppp_packet = g_try_malloc0(response_length + sizeof(struct ppp_header));
+ ppp_packet = ppp_packet_new(response_length, CHAP_PROTOCOL);
if (!ppp_packet)
goto challenge_out;
- /* add our protocol information */
- ppp_packet->proto = htons(CHAP_PROTOCOL);
response = (struct chap_header *) &ppp_packet->info;
if (response) {
response->code = RESPONSE;