summaryrefslogtreecommitdiffstats
path: root/gatchat/ppp_lcp.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-04-09 08:44:29 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-04-09 08:44:29 -0500
commitc26447d9227c2ffe6f45e3ef83f0dbfca78bb0a2 (patch)
treed7528ed2054ab25d03fffec52290d0c42bb0bcfc /gatchat/ppp_lcp.c
parent8f5459ffbc95476f3bb832b97ada835bcc13c914 (diff)
downloadofono-c26447d9227c2ffe6f45e3ef83f0dbfca78bb0a2.tar.bz2
ppp: Use flags instead of booleans for lcp options
Diffstat (limited to 'gatchat/ppp_lcp.c')
-rw-r--r--gatchat/ppp_lcp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index 9b771ef2..a384a0db 100644
--- a/gatchat/ppp_lcp.c
+++ b/gatchat/ppp_lcp.c
@@ -61,11 +61,13 @@ enum lcp_options {
/* Maximum size of all options, we only ever request ACCM */
#define MAX_CONFIG_OPTION_SIZE 6
+#define REQ_OPTION_ACCM 0x1
+
struct lcp_data {
guint32 magic_number;
guint8 options[MAX_CONFIG_OPTION_SIZE];
guint16 options_len;
- gboolean req_accm; /* Should we request ACCM */
+ guint8 req_options;
guint32 accm; /* ACCM value */
};
@@ -73,7 +75,7 @@ static void lcp_generate_config_options(struct lcp_data *lcp)
{
guint16 len = 0;
- if (lcp->req_accm) {
+ if (lcp->req_options & REQ_OPTION_ACCM) {
guint32 accm;
accm = htonl(lcp->accm);
@@ -280,7 +282,7 @@ struct pppcp_data *lcp_new(GAtPPP *ppp)
pppcp_set_data(pppcp, lcp);
- lcp->req_accm = TRUE;
+ lcp->req_options = REQ_OPTION_ACCM;
lcp->accm = 0;
lcp_generate_config_options(lcp);