diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2007-05-26 18:15:54 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2007-05-26 18:15:54 +0000 |
commit | bba444524eca700970f69261bc470fb01a138222 (patch) | |
tree | 7d5e302586ed757a6eb3f71a27f84bba60383fd4 /src/inputStream_http.c | |
parent | dba45a59928301da0faa4ec679eb1a3a81d5fba5 (diff) | |
download | mpd-bba444524eca700970f69261bc470fb01a138222.tar.gz mpd-bba444524eca700970f69261bc470fb01a138222.tar.xz mpd-bba444524eca700970f69261bc470fb01a138222.zip |
Changing all calls to ERROR() followed by exit(EXIT_FAILURE) with a single
call to FATAL().
git-svn-id: https://svn.musicpd.org/mpd/trunk@6276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/inputStream_http.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/inputStream_http.c b/src/inputStream_http.c index 152fa4760..3f18575dd 100644 --- a/src/inputStream_http.c +++ b/src/inputStream_http.c @@ -81,9 +81,8 @@ void inputStream_initHttp(void) param = getConfigParam(CONF_HTTP_PROXY_PORT); if (!param) { - ERROR("%s specified but not %s", CONF_HTTP_PROXY_HOST, + FATAL("%s specified but not %s", CONF_HTTP_PROXY_HOST, CONF_HTTP_PROXY_PORT); - exit(EXIT_FAILURE); } proxyPort = param->value; @@ -95,10 +94,9 @@ void inputStream_initHttp(void) param = getConfigParam(CONF_HTTP_PROXY_PASSWORD); if (!param) { - ERROR("%s specified but not %s\n", + FATAL("%s specified but not %s\n", CONF_HTTP_PROXY_USER, CONF_HTTP_PROXY_PASSWORD); - exit(EXIT_FAILURE); } proxyPassword = param->value; @@ -106,24 +104,20 @@ void inputStream_initHttp(void) param = getConfigParam(CONF_HTTP_PROXY_PASSWORD); if (param) { - ERROR("%s specified but not %s\n", + FATAL("%s specified but not %s\n", CONF_HTTP_PROXY_PASSWORD, CONF_HTTP_PROXY_USER); - exit(EXIT_FAILURE); } } } else if ((param = getConfigParam(CONF_HTTP_PROXY_PORT))) { - ERROR("%s specified but not %s, line %i\n", + FATAL("%s specified but not %s, line %i\n", CONF_HTTP_PROXY_PORT, CONF_HTTP_PROXY_HOST, param->line); - exit(EXIT_FAILURE); } else if ((param = getConfigParam(CONF_HTTP_PROXY_USER))) { - ERROR("%s specified but not %s, line %i\n", + FATAL("%s specified but not %s, line %i\n", CONF_HTTP_PROXY_USER, CONF_HTTP_PROXY_HOST, param->line); - exit(EXIT_FAILURE); } else if ((param = getConfigParam(CONF_HTTP_PROXY_PASSWORD))) { - ERROR("%s specified but not %s, line %i\n", + FATAL("%s specified but not %s, line %i\n", CONF_HTTP_PROXY_PASSWORD, CONF_HTTP_PROXY_HOST, param->line); - exit(EXIT_FAILURE); } param = getConfigParam(CONF_HTTP_BUFFER_SIZE); @@ -132,10 +126,9 @@ void inputStream_initHttp(void) bufferSize = strtol(param->value, &test, 10); if (bufferSize <= 0 || *test != '\0') { - ERROR("\"%s\" specified for %s at line %i is not a " + FATAL("\"%s\" specified for %s at line %i is not a " "positive integer\n", param->value, CONF_HTTP_BUFFER_SIZE, param->line); - exit(EXIT_FAILURE); } bufferSize *= 1024; @@ -150,11 +143,10 @@ void inputStream_initHttp(void) prebufferSize = strtol(param->value, &test, 10); if (prebufferSize <= 0 || *test != '\0') { - ERROR("\"%s\" specified for %s at line %i is not a " + FATAL("\"%s\" specified for %s at line %i is not a " "positive integer\n", param->value, CONF_HTTP_PREBUFFER_SIZE, param->line); - exit(EXIT_FAILURE); } prebufferSize *= 1024; |