Fix whitespace
This commit is contained in:
parent
9d2b9ee61d
commit
2d30b72498
1 changed files with 21 additions and 21 deletions
42
config.c
42
config.c
|
@ -114,45 +114,45 @@ STATUS read_configuration_file(TALLOC_CTX *mem_ctx)
|
|||
conf = talloc_zero(mem_ctx, configuration);
|
||||
NO_MEM_RETURN(conf);
|
||||
|
||||
conf->keyfile = g_key_file_new ();
|
||||
conf->keyfile = g_key_file_new ();
|
||||
|
||||
if (!g_key_file_load_from_file (conf->keyfile, CONFIGFILE, 0, &error)) {
|
||||
g_error (error->message);
|
||||
g_error_free(error);
|
||||
g_error ("%s", error->message);
|
||||
g_error_free(error);
|
||||
return ST_CONFIGURATION_ERROR;
|
||||
}
|
||||
|
||||
buf = g_key_file_get_string(conf->keyfile, "siahsd", "event handlers", &error);
|
||||
if (error) {
|
||||
fprintf(stderr, "No event handler supplied in the configuration.\n");
|
||||
g_error_free(error);
|
||||
g_error_free(error);
|
||||
return ST_CONFIGURATION_ERROR;
|
||||
}
|
||||
|
||||
conf->log_file = g_key_file_get_string(conf->keyfile, "siahsd", "log file", &error);
|
||||
if (error) {
|
||||
fprintf(stderr, "No log file supplied in the configuration.\n");
|
||||
g_error_free(error);
|
||||
g_error_free(error);
|
||||
return ST_CONFIGURATION_ERROR;
|
||||
}
|
||||
conf->log_level = g_key_file_get_integer(conf->keyfile, "siahsd", "log level", &error);
|
||||
if (error) {
|
||||
fprintf(stderr, "No log level supplied in the configuration.\n");
|
||||
g_error_free(error);
|
||||
g_error_free(error);
|
||||
return ST_CONFIGURATION_ERROR;
|
||||
}
|
||||
conf->pid_file = g_key_file_get_string(conf->keyfile, "siahsd", "pid file", &error);
|
||||
if (error) {
|
||||
fprintf(stderr, "No pid file supplied in the configuration.\n");
|
||||
g_error_free(error);
|
||||
g_error_free(error);
|
||||
return ST_CONFIGURATION_ERROR;
|
||||
}
|
||||
|
||||
conf->foreground = g_key_file_get_boolean(conf->keyfile, "siahsd", "foreground", &error);
|
||||
if (error) {
|
||||
conf->foreground = false;
|
||||
g_error_free(error);
|
||||
error = NULL;
|
||||
g_error_free(error);
|
||||
error = NULL;
|
||||
}
|
||||
|
||||
/* Initialize the required event handler backends */
|
||||
|
@ -172,20 +172,20 @@ STATUS read_configuration_file(TALLOC_CTX *mem_ctx)
|
|||
/* Optional parameters are protocol-specific */
|
||||
/* FIXME Warn the user when these aren't configured */
|
||||
conf->siahs_port = g_key_file_get_integer(conf->keyfile, "siahs", "port", &error);
|
||||
if (error) {
|
||||
g_error_free(error);
|
||||
error = NULL;
|
||||
}
|
||||
if (error) {
|
||||
g_error_free(error);
|
||||
error = NULL;
|
||||
}
|
||||
conf->secip_port = g_key_file_get_integer(conf->keyfile, "secip", "port", &error);
|
||||
if (error) {
|
||||
g_error_free(error);
|
||||
error = NULL;
|
||||
}
|
||||
if (error) {
|
||||
g_error_free(error);
|
||||
error = NULL;
|
||||
}
|
||||
conf->rsa_key_file = g_key_file_get_string(conf->keyfile, "secip", "rsa key file", &error);
|
||||
if (error) {
|
||||
g_error_free(error);
|
||||
error = NULL;
|
||||
}
|
||||
if (error) {
|
||||
g_error_free(error);
|
||||
error = NULL;
|
||||
}
|
||||
|
||||
return ST_OK;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue