Fix whitespace

This commit is contained in:
Wilco Baan Hofman 2016-11-28 10:12:56 +01:00
parent 9d2b9ee61d
commit 2d30b72498

View file

@ -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;
}