diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-04-08 10:39:00 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-08 10:40:12 -0500 |
commit | c5590d114e62209fb847f10135807990b7187d99 (patch) | |
tree | a3545cd3431d97ef2e6fbf798cfaa420f6b25add /gatchat/ppp_lcp.c | |
parent | 4e01f9921e527a4e360a43eff6f9b8bcda70a5c5 (diff) | |
download | ofono-c5590d114e62209fb847f10135807990b7187d99.tar.gz |
ppp: Move some one-time setters to the proto
Diffstat (limited to 'gatchat/ppp_lcp.c')
-rw-r--r-- | gatchat/ppp_lcp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c index 4aec88dc..5f080bfa 100644 --- a/gatchat/ppp_lcp.c +++ b/gatchat/ppp_lcp.c @@ -201,7 +201,11 @@ static const char *lcp_option_strings[256] = { [13] = "Callback", }; -struct pppcp_action lcp_action = { +struct pppcp_proto lcp_proto = { + .proto = LCP_PROTOCOL, + .name = "lcp", + .option_strings = lcp_option_strings, + .supported_codes = LCP_SUPPORTED_CODES, .this_layer_up = lcp_up, .this_layer_down = lcp_down, .this_layer_started = lcp_started, @@ -256,16 +260,12 @@ struct pppcp_data *lcp_new(GAtPPP *ppp) if (!lcp) return NULL; - pppcp = pppcp_new(ppp, LCP_PROTOCOL, &lcp_action); + pppcp = pppcp_new(ppp, &lcp_proto); if (!pppcp) { g_free(lcp); return NULL; } - pppcp_set_option_strings(pppcp, lcp_option_strings); - pppcp_set_prefix(pppcp, "lcp"); - - pppcp_set_valid_codes(pppcp, LCP_SUPPORTED_CODES); pppcp_set_data(pppcp, lcp); /* add the default config options */ |