diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-09-20 16:36:42 +0200 |
---|---|---|
committer | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2011-09-22 15:45:50 +0200 |
commit | 79ed8fbfe4fb427b0e3bb86cfdd029434dd2f9c8 (patch) | |
tree | 9982e066371bcea59ae1de64150341aae1f7579d /src/session.c | |
parent | a3a6fb3eaa61e32b3169398f481bcfafb7b7bf5f (diff) | |
download | connman-79ed8fbfe4fb427b0e3bb86cfdd029434dd2f9c8.tar.gz connman-79ed8fbfe4fb427b0e3bb86cfdd029434dd2f9c8.tar.bz2 connman-79ed8fbfe4fb427b0e3bb86cfdd029434dd2f9c8.zip |
session: Add CONNMAN_SESSION_REASON_DISCONNECT
Maybe the reason code should be renamed to state
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/session.c b/src/session.c index f577439c..3f66951e 100644 --- a/src/session.c +++ b/src/session.c @@ -48,8 +48,9 @@ enum connman_session_trigger { enum connman_session_reason { CONNMAN_SESSION_REASON_UNKNOWN = 0, CONNMAN_SESSION_REASON_CONNECT = 1, - CONNMAN_SESSION_REASON_FREE_RIDE = 2, - CONNMAN_SESSION_REASON_PERIODIC = 3, + CONNMAN_SESSION_REASON_DISCONNECT = 2, + CONNMAN_SESSION_REASON_FREE_RIDE = 3, + CONNMAN_SESSION_REASON_PERIODIC = 4, }; enum connman_session_roaming_policy { @@ -137,6 +138,8 @@ static const char *reason2string(enum connman_session_reason reason) return "unknown"; case CONNMAN_SESSION_REASON_CONNECT: return "connect"; + case CONNMAN_SESSION_REASON_DISCONNECT: + return "disconnect"; case CONNMAN_SESSION_REASON_FREE_RIDE: return "free-ride"; case CONNMAN_SESSION_REASON_PERIODIC: @@ -718,6 +721,7 @@ static connman_bool_t explicit_connect(enum connman_session_reason reason) switch (reason) { case CONNMAN_SESSION_REASON_UNKNOWN: case CONNMAN_SESSION_REASON_FREE_RIDE: + case CONNMAN_SESSION_REASON_DISCONNECT: break; case CONNMAN_SESSION_REASON_CONNECT: case CONNMAN_SESSION_REASON_PERIODIC: @@ -993,6 +997,7 @@ static void session_changed(struct connman_session *session, CONNMAN_SESSION_REASON_FREE_RIDE); } break; + case CONNMAN_SESSION_REASON_DISCONNECT: case CONNMAN_SESSION_REASON_UNKNOWN: break; } |