summaryrefslogtreecommitdiffstats
path: root/gatchat/ppp_net.c
diff options
context:
space:
mode:
authorKristen Carlson Accardi <kristen@linux.intel.com>2010-05-10 13:06:37 -0700
committerDenis Kenzior <denkenz@gmail.com>2010-05-10 16:27:15 -0500
commit125fc62526114acd373ed090edbd42a01300e2af (patch)
tree0b45feb0a6a2a05d6ebd1d724f5df073c6c09273 /gatchat/ppp_net.c
parentf13d5e2badcd2ca277e895990e47bb49e1df81a3 (diff)
downloadofono-125fc62526114acd373ed090edbd42a01300e2af.tar.bz2
ppp: set address and control field
Before sending to hdlc, set the address and control field. Fix hardcode of ppp header size.
Diffstat (limited to 'gatchat/ppp_net.c')
-rw-r--r--gatchat/ppp_net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gatchat/ppp_net.c b/gatchat/ppp_net.c
index afebf583..4e45ef14 100644
--- a/gatchat/ppp_net.c
+++ b/gatchat/ppp_net.c
@@ -105,7 +105,8 @@ static gboolean ppp_net_callback(GIOChannel *channel, GIOCondition cond,
if (cond & G_IO_IN) {
/* leave space to add PPP protocol field */
- status = g_io_channel_read_chars(channel, buf + 2, net->mtu,
+ status = g_io_channel_read_chars(channel,
+ buf + sizeof(struct ppp_header), net->mtu,
&bytes_read, &error);
if (bytes_read > 0) {
ppp->proto = htons(PPP_IP_PROTO);