mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-31 15:11:08 +00:00
Merge the functions of ccnet-server into seafile-server (#293)
* merge the api of ccnet into seafile * merge the api of ccnet into seafile * Dont't need to include the header * merge the api of ccnet into seafile * add enable ldap * The unit test dont't need to start ccnet-server * Modify some funcion names and fuse don't need org management * Modify indent
This commit is contained in:
19
lib/utils.c
19
lib/utils.c
@@ -2478,3 +2478,22 @@ seaf_key_file_get_string (GKeyFile *key_file,
|
||||
|
||||
return g_strchomp(v);
|
||||
}
|
||||
|
||||
gchar*
|
||||
ccnet_key_file_get_string (GKeyFile *keyf,
|
||||
const char *category,
|
||||
const char *key)
|
||||
{
|
||||
gchar *v;
|
||||
|
||||
if (!g_key_file_has_key (keyf, category, key, NULL))
|
||||
return NULL;
|
||||
|
||||
v = g_key_file_get_string (keyf, category, key, NULL);
|
||||
if (v != NULL && v[0] == '\0') {
|
||||
g_free(v);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return g_strchomp(v);
|
||||
}
|
||||
|
Reference in New Issue
Block a user