diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-04-05 10:11:31 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-05 10:12:39 -0500 |
commit | e56710e1da3e4f7ab0c71d450532257e35e7ccb1 (patch) | |
tree | 953e42a1ce6373d243b5ed5848dd69cca140ddee /gatchat/ppp_cp.c | |
parent | 9905245e796a51c8425c70fdb6c760ab26ec7176 (diff) | |
download | ofono-e56710e1da3e4f7ab0c71d450532257e35e7ccb1.tar.bz2 |
Refactor: Move the state definition to ppp_cp.c
Diffstat (limited to 'gatchat/ppp_cp.c')
-rw-r--r-- | gatchat/ppp_cp.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gatchat/ppp_cp.c b/gatchat/ppp_cp.c index c5af89a6..ea2ee7f9 100644 --- a/gatchat/ppp_cp.c +++ b/gatchat/ppp_cp.c @@ -34,10 +34,6 @@ #include "gatppp.h" #include "ppp.h" -static const char *pppcp_state_strings[] = - {"INITIAL", "STARTING", "CLOSED", "STOPPED", "CLOSING", "STOPPING", - "REQSENT", "ACKRCVD", "ACKSENT", "OPENED" }; - #define pppcp_trace(p) do { \ char *str = g_strdup_printf("%s: %s: current state %d:%s", \ p->prefix, __FUNCTION__, \ @@ -57,6 +53,23 @@ static const char *pppcp_state_strings[] = #define MAX_FAILURE 5 #define CP_HEADER_SZ 4 +enum pppcp_state { + INITIAL = 0, + STARTING = 1, + CLOSED = 2, + STOPPED = 3, + CLOSING = 4, + STOPPING = 5, + REQSENT = 6, + ACKRCVD = 7, + ACKSENT = 8, + OPENED = 9, +}; + +static const char *pppcp_state_strings[] = + {"INITIAL", "STARTING", "CLOSED", "STOPPED", "CLOSING", "STOPPING", + "REQSENT", "ACKRCVD", "ACKSENT", "OPENED" }; + static void pppcp_packet_free(struct pppcp_packet *packet) { g_free(pppcp_to_ppp_packet(packet)); |