diff options
author | Kristen Carlson Accardi <kristen@linux.intel.com> | 2010-05-13 10:31:32 -0700 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-05-19 02:58:45 -0500 |
commit | 3fff4c49c8de500a6355e012c7246890368b2cb7 (patch) | |
tree | dcc11fd6608fad5ac80c14af92125364ccd458e9 /gatchat/ppp_cp.c | |
parent | 0d8b86ed79ff6f12d35c5c155e858e3c174af34b (diff) | |
download | ofono-3fff4c49c8de500a6355e012c7246890368b2cb7.tar.bz2 |
ppp: implement ppp_packet_new
Diffstat (limited to 'gatchat/ppp_cp.c')
-rw-r--r-- | gatchat/ppp_cp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gatchat/ppp_cp.c b/gatchat/ppp_cp.c index e152f6ef..bade6bbe 100644 --- a/gatchat/ppp_cp.c +++ b/gatchat/ppp_cp.c @@ -204,13 +204,10 @@ static struct pppcp_packet *pppcp_packet_new(struct pppcp_data *data, struct ppp_header *ppp_packet; guint16 packet_length = bufferlen + sizeof(*packet); - ppp_packet = g_try_malloc0(packet_length + sizeof(*ppp_packet)); + ppp_packet = ppp_packet_new(packet_length, data->driver->proto); if (!ppp_packet) return NULL; - /* add our protocol information */ - ppp_packet->proto = htons(data->driver->proto); - /* advance past protocol to add CP header information */ packet = (struct pppcp_packet *) (ppp_packet->info); |