diff options
author | Zhang zhengguang <zhengguang.zhang@intel.com> | 2014-07-17 10:37:39 +0800 |
---|---|---|
committer | Zhang zhengguang <zhengguang.zhang@intel.com> | 2014-07-17 10:37:39 +0800 |
commit | 1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7 (patch) | |
tree | 6e991827d28537f7f40f20786c2354fd04a9fdad /src/rfkill.c | |
parent | fbe905ab58ecc31fe64c410c5f580cadc30e7f04 (diff) | |
download | connman-1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7.tar.gz connman-1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7.tar.bz2 connman-1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7.zip |
Imported Upstream version 1.24upstream/1.24
Diffstat (limited to 'src/rfkill.c')
-rw-r--r-- | src/rfkill.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rfkill.c b/src/rfkill.c index e21b2a15..960cfea7 100644 --- a/src/rfkill.c +++ b/src/rfkill.c @@ -2,7 +2,7 @@ * * Connection Manager * - * Copyright (C) 2007-2012 Intel Corporation. All rights reserved. + * Copyright (C) 2007-2013 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -88,6 +88,7 @@ static enum rfkill_type convert_service_type(enum connman_service_type type) case CONNMAN_SERVICE_TYPE_ETHERNET: case CONNMAN_SERVICE_TYPE_VPN: case CONNMAN_SERVICE_TYPE_GADGET: + case CONNMAN_SERVICE_TYPE_P2P: case CONNMAN_SERVICE_TYPE_UNKNOWN: return NUM_RFKILL_TYPES; } @@ -141,8 +142,7 @@ static GIOStatus rfkill_process(GIOChannel *chan) return status; } -static gboolean rfkill_event(GIOChannel *chan, - GIOCondition cond, gpointer data) +static gboolean rfkill_event(GIOChannel *chan, GIOCondition cond, gpointer data) { if (cond & (G_IO_NVAL | G_IO_HUP | G_IO_ERR)) return FALSE; @@ -155,7 +155,7 @@ static gboolean rfkill_event(GIOChannel *chan, static GIOChannel *channel = NULL; -int __connman_rfkill_block(enum connman_service_type type, connman_bool_t block) +int __connman_rfkill_block(enum connman_service_type type, bool block) { uint8_t rfkill_type; struct rfkill_event event; @@ -225,7 +225,7 @@ void __connman_rfkill_cleanup(void) { DBG(""); - if (channel == NULL) + if (!channel) return; g_io_channel_shutdown(channel, TRUE, NULL); |