summaryrefslogtreecommitdiff
path: root/vpn/vpn-agent.c
diff options
context:
space:
mode:
authorZhang zhengguang <zhengguang.zhang@intel.com>2014-07-17 02:37:39 (GMT)
committerZhang zhengguang <zhengguang.zhang@intel.com>2014-07-17 02:37:39 (GMT)
commit1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7 (patch)
tree6e991827d28537f7f40f20786c2354fd04a9fdad /vpn/vpn-agent.c
parentfbe905ab58ecc31fe64c410c5f580cadc30e7f04 (diff)
downloadconnman-upstream/1.24.zip
connman-upstream/1.24.tar.gz
connman-upstream/1.24.tar.bz2
Imported Upstream version 1.24upstream/1.24
Diffstat (limited to 'vpn/vpn-agent.c')
-rw-r--r--vpn/vpn-agent.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/vpn/vpn-agent.c b/vpn/vpn-agent.c
index f1cfb1e..b0b582b 100644
--- a/vpn/vpn-agent.c
+++ b/vpn/vpn-agent.c
@@ -35,7 +35,7 @@
#include "vpn-agent.h"
#include "vpn.h"
-connman_bool_t vpn_agent_check_reply_has_dict(DBusMessage *reply)
+bool vpn_agent_check_reply_has_dict(DBusMessage *reply)
{
const char *signature = DBUS_TYPE_ARRAY_AS_STRING
DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
@@ -43,8 +43,8 @@ connman_bool_t vpn_agent_check_reply_has_dict(DBusMessage *reply)
DBUS_TYPE_VARIANT_AS_STRING
DBUS_DICT_ENTRY_END_CHAR_AS_STRING;
- if (dbus_message_has_signature(reply, signature) == TRUE)
- return TRUE;
+ if (dbus_message_has_signature(reply, signature))
+ return true;
connman_warn("Reply %s to %s from %s has wrong signature %s",
signature,
@@ -52,7 +52,7 @@ connman_bool_t vpn_agent_check_reply_has_dict(DBusMessage *reply)
dbus_message_get_sender(reply),
dbus_message_get_signature(reply));
- return FALSE;
+ return false;
}
static void request_input_append_name(DBusMessageIter *iter, void *user_data)
@@ -117,9 +117,9 @@ static void request_input_append_user_info(DBusMessageIter *iter,
connman_dbus_dict_append_basic(iter, "Requirement",
DBUS_TYPE_STRING, &str);
- if (data->username_str != NULL) {
+ if (data->username_str) {
str = vpn_provider_get_string(provider, data->username_str);
- if (str != NULL)
+ if (str)
connman_dbus_dict_append_basic(iter, "Value",
DBUS_TYPE_STRING, &str);
}