aboutsummaryrefslogtreecommitdiffstats
path: root/src/Permission.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-15 22:32:39 +0200
committerMax Kellermann <max@duempel.org>2013-10-15 22:49:01 +0200
commit7de96275dd6e3b6997e799413e4537561041e199 (patch)
tree4eab0c018168c14eb22f9e086917d16ef3f8f6a8 /src/Permission.cxx
parente13d0bf65653550c4cfe3f879441139f5242d8b1 (diff)
downloadmpd-7de96275dd6e3b6997e799413e4537561041e199.tar.gz
mpd-7de96275dd6e3b6997e799413e4537561041e199.tar.xz
mpd-7de96275dd6e3b6997e799413e4537561041e199.zip
ConfigData: use std::string for config_param::value
Diffstat (limited to '')
-rw-r--r--src/Permission.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Permission.cxx b/src/Permission.cxx
index f53465b83..dafa4e00c 100644
--- a/src/Permission.cxx
+++ b/src/Permission.cxx
@@ -88,15 +88,17 @@ void initPermissions(void)
do {
const char *separator =
- strchr(param->value, PERMISSION_PASSWORD_CHAR);
+ strchr(param->value.c_str(),
+ PERMISSION_PASSWORD_CHAR);
if (separator == NULL)
FormatFatalError("\"%c\" not found in password string "
"\"%s\", line %i",
PERMISSION_PASSWORD_CHAR,
- param->value, param->line);
+ param->value.c_str(),
+ param->line);
- std::string password((const char *)param->value, separator);
+ std::string password(param->value.c_str(), separator);
permission = parsePermissions(separator + 1);
@@ -108,7 +110,7 @@ void initPermissions(void)
param = config_get_param(CONF_DEFAULT_PERMS);
if (param)
- permission_default = parsePermissions(param->value);
+ permission_default = parsePermissions(param->value.c_str());
}
int getPermissionFromPassword(char const* password, unsigned* permission)