diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-04-01 09:13:44 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-04-01 09:13:44 -0700 |
commit | 4f99859d37800baf2f87b3869f1c0e1903e3467a (patch) | |
tree | 1ac2ea8ec078cce79d6216e404eaa45e828a6ee6 /gatchat/ppp_lcp.c | |
parent | 5f0d8493e7f2f60130e34927789b9b4effacb533 (diff) | |
download | ofono-4f99859d37800baf2f87b3869f1c0e1903e3467a.tar.bz2 |
Remove useless pppcp_protocol_data structure
Diffstat (limited to 'gatchat/ppp_lcp.c')
-rw-r--r-- | gatchat/ppp_lcp.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c index 9bfa4752..1fcb40ea 100644 --- a/gatchat/ppp_lcp.c +++ b/gatchat/ppp_lcp.c @@ -153,8 +153,6 @@ static void lcp_option_process(gpointer data, gpointer user) } } -static const char lcp_prefix[] = "lcp"; - static const char *lcp_option_strings[256] = { [0] = "Vendor Specific", [1] = "Maximum-Receive-Unit", @@ -172,12 +170,6 @@ static const char *lcp_option_strings[256] = { [13] = "Callback", }; -static struct pppcp_protocol_data lcp_protocol_data = { - .proto = LCP_PROTOCOL, - .prefix = lcp_prefix, - .options = lcp_option_strings, -}; - struct ppp_packet_handler lcp_packet_handler = { .proto = LCP_PROTOCOL, .handler = pppcp_process_packet, @@ -249,13 +241,14 @@ struct pppcp_data *lcp_new(GAtPPP *ppp) struct ppp_option *option; guint16 codes = LCP_SUPPORTED_CODES; - lcp_protocol_data.ppp = ppp; - pppcp = pppcp_new(&lcp_protocol_data); + pppcp = pppcp_new(ppp, LCP_PROTOCOL); if (!pppcp) { g_print("Failed to allocate PPPCP struct\n"); return NULL; } pppcp_set_valid_codes(pppcp, codes); + pppcp->option_strings = lcp_option_strings; + pppcp->prefix = "lcp"; pppcp->priv = pppcp; /* set the actions */ |