diff options
| author | Michael Biebl <biebl@debian.org> | 2019-02-26 19:02:28 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-02-26 19:02:28 +0100 |
| commit | 439c9d76f576ae28c73571d444c59d9e95e5ad11 (patch) | |
| tree | 7591e0b43641131fc049d6d7a0bd19e9e4964a40 /src/nm-connectivity.h | |
| parent | 12aead6b161a3312673ac62686af0350061c0666 (diff) | |
| parent | 964ae8cc391520440cf5aa13e2b9cc34850ea6c2 (diff) | |
Update upstream source from tag 'upstream/1.14.6'
Update to upstream version '1.14.6' with Debian dir ef09251bb8b7a4afa8e2b004d785517d8a2d973d
Diffstat (limited to 'src/nm-connectivity.h')
| -rw-r--r-- | src/nm-connectivity.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nm-connectivity.h b/src/nm-connectivity.h index 178f27ad..99333ced 100644 --- a/src/nm-connectivity.h +++ b/src/nm-connectivity.h @@ -24,6 +24,21 @@ #include "nm-dbus-interface.h" +/*****************************************************************************/ + +static inline int +nm_connectivity_state_cmp (NMConnectivityState a, NMConnectivityState b) +{ + if (a == NM_CONNECTIVITY_PORTAL && b == NM_CONNECTIVITY_LIMITED) + return 1; + if (b == NM_CONNECTIVITY_PORTAL && a == NM_CONNECTIVITY_LIMITED) + return -1; + NM_CMP_DIRECT (a, b); + return 0; +} + +/*****************************************************************************/ + #define NM_CONNECTIVITY_ERROR ((NMConnectivityState) -1) #define NM_CONNECTIVITY_FAKE ((NMConnectivityState) -2) #define NM_CONNECTIVITY_CANCELLED ((NMConnectivityState) -3) |