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); conf = talloc_zero(mem_ctx, configuration);
NO_MEM_RETURN(conf); 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)) { if (!g_key_file_load_from_file (conf->keyfile, CONFIGFILE, 0, &error)) {
g_error (error->message); g_error ("%s", error->message);
g_error_free(error); g_error_free(error);
return ST_CONFIGURATION_ERROR; return ST_CONFIGURATION_ERROR;
} }
buf = g_key_file_get_string(conf->keyfile, "siahsd", "event handlers", &error); buf = g_key_file_get_string(conf->keyfile, "siahsd", "event handlers", &error);
if (error) { if (error) {
fprintf(stderr, "No event handler supplied in the configuration.\n"); fprintf(stderr, "No event handler supplied in the configuration.\n");
g_error_free(error); g_error_free(error);
return ST_CONFIGURATION_ERROR; return ST_CONFIGURATION_ERROR;
} }
conf->log_file = g_key_file_get_string(conf->keyfile, "siahsd", "log file", &error); conf->log_file = g_key_file_get_string(conf->keyfile, "siahsd", "log file", &error);
if (error) { if (error) {
fprintf(stderr, "No log file supplied in the configuration.\n"); fprintf(stderr, "No log file supplied in the configuration.\n");
g_error_free(error); g_error_free(error);
return ST_CONFIGURATION_ERROR; return ST_CONFIGURATION_ERROR;
} }
conf->log_level = g_key_file_get_integer(conf->keyfile, "siahsd", "log level", &error); conf->log_level = g_key_file_get_integer(conf->keyfile, "siahsd", "log level", &error);
if (error) { if (error) {
fprintf(stderr, "No log level supplied in the configuration.\n"); fprintf(stderr, "No log level supplied in the configuration.\n");
g_error_free(error); g_error_free(error);
return ST_CONFIGURATION_ERROR; return ST_CONFIGURATION_ERROR;
} }
conf->pid_file = g_key_file_get_string(conf->keyfile, "siahsd", "pid file", &error); conf->pid_file = g_key_file_get_string(conf->keyfile, "siahsd", "pid file", &error);
if (error) { if (error) {
fprintf(stderr, "No pid file supplied in the configuration.\n"); fprintf(stderr, "No pid file supplied in the configuration.\n");
g_error_free(error); g_error_free(error);
return ST_CONFIGURATION_ERROR; return ST_CONFIGURATION_ERROR;
} }
conf->foreground = g_key_file_get_boolean(conf->keyfile, "siahsd", "foreground", &error); conf->foreground = g_key_file_get_boolean(conf->keyfile, "siahsd", "foreground", &error);
if (error) { if (error) {
conf->foreground = false; conf->foreground = false;
g_error_free(error); g_error_free(error);
error = NULL; error = NULL;
} }
/* Initialize the required event handler backends */ /* Initialize the required event handler backends */
@ -172,20 +172,20 @@ STATUS read_configuration_file(TALLOC_CTX *mem_ctx)
/* Optional parameters are protocol-specific */ /* Optional parameters are protocol-specific */
/* FIXME Warn the user when these aren't configured */ /* FIXME Warn the user when these aren't configured */
conf->siahs_port = g_key_file_get_integer(conf->keyfile, "siahs", "port", &error); conf->siahs_port = g_key_file_get_integer(conf->keyfile, "siahs", "port", &error);
if (error) { if (error) {
g_error_free(error); g_error_free(error);
error = NULL; error = NULL;
} }
conf->secip_port = g_key_file_get_integer(conf->keyfile, "secip", "port", &error); conf->secip_port = g_key_file_get_integer(conf->keyfile, "secip", "port", &error);
if (error) { if (error) {
g_error_free(error); g_error_free(error);
error = NULL; error = NULL;
} }
conf->rsa_key_file = g_key_file_get_string(conf->keyfile, "secip", "rsa key file", &error); conf->rsa_key_file = g_key_file_get_string(conf->keyfile, "secip", "rsa key file", &error);
if (error) { if (error) {
g_error_free(error); g_error_free(error);
error = NULL; error = NULL;
} }
return ST_OK; return ST_OK;
} }