mirror of git://git.sysmocom.de/ofono
Fix whitespace damage in PPP implementation
This commit is contained in:
parent
33e11e910c
commit
f87537644b
|
@ -164,7 +164,7 @@ static guint8 *ppp_encode(GAtPPP *ppp, guint8 *data, int len,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add FCS */
|
/* add FCS */
|
||||||
fcs ^= 0xffff; /* complement */
|
fcs ^= 0xffff; /* complement */
|
||||||
ppp_put(ppp, frame, &pos, (guint8)(fcs & 0x00ff), lcp);
|
ppp_put(ppp, frame, &pos, (guint8)(fcs & 0x00ff), lcp);
|
||||||
ppp_put(ppp, frame, &pos, (guint8)((fcs >> 8) & 0x00ff), lcp);
|
ppp_put(ppp, frame, &pos, (guint8)((fcs >> 8) & 0x00ff), lcp);
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ void ppp_transmit(GAtPPP *ppp, guint8 *packet, guint infolen)
|
||||||
* we won't block, or allow ourselves to block here?
|
* we won't block, or allow ourselves to block here?
|
||||||
*/
|
*/
|
||||||
status = g_io_channel_write_chars(ppp->modem, (gchar *) frame,
|
status = g_io_channel_write_chars(ppp->modem, (gchar *) frame,
|
||||||
framelen, &bytes_written, &error);
|
framelen, &bytes_written, &error);
|
||||||
|
|
||||||
g_free(frame);
|
g_free(frame);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "gatppp.h"
|
#include "gatppp.h"
|
||||||
#include "ppp.h"
|
#include "ppp.h"
|
||||||
|
|
||||||
|
#define DEBUG
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
static const char *pppcp_state_strings[] =
|
static const char *pppcp_state_strings[] =
|
||||||
{"INITIAL", "STARTING", "CLOSED", "STOPPED", "CLOSING", "STOPPING",
|
{"INITIAL", "STARTING", "CLOSED", "STOPPED", "CLOSING", "STOPPING",
|
||||||
|
|
|
@ -75,7 +75,7 @@ static void ip_process_packet(gpointer priv, guint8 *packet)
|
||||||
/* find the length of the packet to transmit */
|
/* find the length of the packet to transmit */
|
||||||
len = get_host_short(&packet[2]);
|
len = get_host_short(&packet[2]);
|
||||||
status = g_io_channel_write_chars(data->channel, (gchar *) packet,
|
status = g_io_channel_write_chars(data->channel, (gchar *) packet,
|
||||||
len, &bytes_written, &error);
|
len, &bytes_written, &error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue