Using "::" instead of "_" as a delimiter for sections in the configuration
This commit is contained in:
parent
cf4397e0d5
commit
1df25fe5cf
@ -1,5 +1,5 @@
|
||||
/* $Id$ */
|
||||
/* Copyright (c) 2011 Pierre Pronchery <khorben@defora.org> */
|
||||
/* Copyright (c) 2010-2012 Pierre Pronchery <khorben@defora.org> */
|
||||
/* This file is part of DeforaOS Desktop Phone */
|
||||
/* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -102,7 +102,7 @@ static void _new_config(Config * config, char const * name,
|
||||
|
||||
if(plugin->config == NULL)
|
||||
return;
|
||||
if((section = string_new_append("modem_", name, NULL)) == NULL)
|
||||
if((section = string_new_append("modem::", name, NULL)) == NULL)
|
||||
return; /* XXX report error */
|
||||
for(i = 0; plugin->config[i].type != MCT_NONE; i++)
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* $Id$ */
|
||||
static char _copyright[] =
|
||||
"Copyright (c) 2012 DeforaOS Project <contact@defora.org>";
|
||||
"Copyright (c) 2010-2012 DeforaOS Project <contact@defora.org>";
|
||||
/* This file is part of DeforaOS Desktop Phone */
|
||||
static char const _license[] =
|
||||
"This program is free software: you can redistribute it and/or modify\n"
|
||||
@ -3268,7 +3268,7 @@ static char const * _phone_config_get(Phone * phone, char const * section,
|
||||
char const * ret;
|
||||
String * s;
|
||||
|
||||
if((s = string_new_append("plugin_", section, NULL)) == NULL)
|
||||
if((s = string_new_append("plugin::", section, NULL)) == NULL)
|
||||
return NULL;
|
||||
ret = config_get(phone->config, s, variable);
|
||||
string_delete(s);
|
||||
@ -3312,7 +3312,7 @@ static int _phone_config_set_type(Phone * phone, char const * type,
|
||||
String * s = NULL;
|
||||
|
||||
if(type != NULL && (s = string_new_append(type, (section != NULL)
|
||||
? "_" : NULL, section, NULL)) == NULL)
|
||||
? "::" : NULL, section, NULL)) == NULL)
|
||||
return -1;
|
||||
ret = config_set(phone->config, s, variable, value);
|
||||
string_delete(s);
|
||||
|
Loading…
Reference in New Issue
Block a user