Commit 671c2366 authored by Thomas B. Rücker's avatar Thomas B. Rücker 😊

Fixed log messages and comments

 * Reworded many log messages for better understanding.
 * Adjusted some version targets as we won't have a 2.4.2 release.
 * Added some FIXME comments
parent 314aa966
......@@ -318,7 +318,7 @@ static void *auth_run_thread (void *arg)
}
thread_sleep (150000);
}
ICECAST_LOG_INFO("Authenication thread shutting down");
ICECAST_LOG_INFO("Authentication thread shutting down");
return NULL;
}
......@@ -494,7 +494,7 @@ auth_t *auth_get_authenticator(xmlNodePtr node)
auth->method[i] = 1;
}
/* BEFORE RELEASE 2.4.2 TODO: Migrate this to config_parse_options(). */
/* BEFORE RELEASE 2.5.0 TODO: Migrate this to config_parse_options(). */
option = node->xmlChildrenNode;
while (option)
{
......
......@@ -202,7 +202,7 @@ static auth_result htpasswd_auth (auth_client *auth_user)
return AUTH_OK;
}
free (hashed_pw);
ICECAST_LOG_DEBUG("incorrect password for client");
ICECAST_LOG_DEBUG("incorrect password for client with username: %s", client->username);
return AUTH_FAILED;
}
ICECAST_LOG_DEBUG("no such username: %s", client->username);
......
......@@ -83,7 +83,7 @@ int auth_get_static_auth (auth_t *authenticator, config_options_t *options)
} else if (strcmp(authenticator->type, AUTH_TYPE_LEGACY_PASSWORD) == 0) {
need_user = 0;
} else {
ICECAST_LOG_ERROR("Type is not known.");
ICECAST_LOG_ERROR("Unknown type.");
return -1;
}
......@@ -113,11 +113,11 @@ int auth_get_static_auth (auth_t *authenticator, config_options_t *options)
}
if (need_user && !auth_info->username) {
ICECAST_LOG_ERROR("No Username given but needed.");
ICECAST_LOG_ERROR("Username required, but not given.");
clear_auth(authenticator);
return -1;
} else if (!auth_info->password) {
ICECAST_LOG_ERROR("No password given but needed.");
ICECAST_LOG_ERROR("Password required, but not given.");
clear_auth(authenticator);
return -1;
}
......
This diff is collapsed.
......@@ -225,11 +225,11 @@ static void get_ssl_certificate(ice_config_t *config)
ICECAST_LOG_WARN("Invalid cipher list: %s", config->cipher_list);
}
config->tls_ok = ssl_ok = 1;
ICECAST_LOG_INFO("SSL certificate found at %s", config->cert_file);
ICECAST_LOG_INFO("SSL using ciphers %s", config->cipher_list);
ICECAST_LOG_INFO("Certificate found at %s", config->cert_file);
ICECAST_LOG_INFO("Using ciphers %s", config->cipher_list);
return;
} while (0);
ICECAST_LOG_INFO("No SSL capability on any configured ports");
ICECAST_LOG_INFO("No TLS capability on any configured ports");
}
......@@ -273,7 +273,8 @@ static int connection_send_ssl(connection_t *con, const void *buf, size_t len)
static void get_ssl_certificate(ice_config_t *config)
{
ssl_ok = 0;
ICECAST_LOG_INFO("No SSL capability");
ICECAST_LOG_INFO("No TLS capability. "
"Rebuild Icecast with openSSL support to enable this.");
}
#endif /* HAVE_OPENSSL */
......@@ -326,7 +327,7 @@ static void recheck_ip_file(cache_file_contents *cache)
return;
}
if (stat(cache->filename, &file_stat) < 0) {
ICECAST_LOG_WARN("failed to check status of \"%s\": %s", cache->filename, strerror(errno));
ICECAST_LOG_WARN("Failed to check status of \"%s\": %s", cache->filename, strerror(errno));
return;
}
if (file_stat.st_mtime == cache->file_mtime)
......@@ -712,7 +713,7 @@ void connection_queue(connection_t *con)
if (sock_set_blocking(client->con->sock, 0) || sock_set_nodelay(client->con->sock)) {
global_unlock();
ICECAST_LOG_WARN("failed to set tcp options on client connection, dropping");
ICECAST_LOG_WARN("Failed to set tcp options on client connection, dropping");
client_destroy(client);
return;
}
......@@ -891,7 +892,7 @@ static inline void source_startup(client_t *client, const char *uri)
#ifdef HAVE_STRCASESTR
if (strcasestr (expectcontinue, "100-continue") != NULL)
#else
ICECAST_LOG_WARN("OS doesn't support case insenestive substring checks...");
ICECAST_LOG_WARN("OS doesn't support case insensitive substring checks...");
if (strstr (expectcontinue, "100-continue") != NULL)
#endif
{
......@@ -962,7 +963,7 @@ static int __add_listener_to_source(source_t *source, client_t *client)
source->mount, source->fallback_mount);
return -1;
}
ICECAST_LOG_INFO("stream full trying %s", next->mount);
ICECAST_LOG_INFO("stream full, trying %s", next->mount);
source = next;
loop--;
continue;
......
......@@ -230,12 +230,12 @@ event_registration_t * event_new_from_xml_node(xmlNodePtr node) {
ret->refcount = 1;
/* BEFORE RELEASE 2.4.2 DOCUMENT: Document <event type="..." trigger="..."> */
/* BEFORE RELEASE 2.5.0 DOCUMENT: Document <event type="..." trigger="..."> */
ret->type = (char*)xmlGetProp(node, XMLSTR("type"));
ret->trigger = (char*)xmlGetProp(node, XMLSTR("trigger"));
if (!ret->type || !ret->trigger) {
ICECAST_LOG_ERROR("Event node isn't complet. Type or Trigger missing.");
ICECAST_LOG_ERROR("Event node isn't complete. Type or Trigger missing.");
event_registration_release(ret);
return NULL;
}
......@@ -250,7 +250,7 @@ event_registration_t * event_new_from_xml_node(xmlNodePtr node) {
rv = event_get_url(ret, options);
#endif
} else {
ICECAST_LOG_ERROR("Event backend %s is unknown.", ret->type);
ICECAST_LOG_ERROR("Unknown Event backend %s.", ret->type);
rv = -1;
}
config_clear_options(options);
......@@ -334,7 +334,7 @@ void event_emit(event_t *event) {
thread_mutex_unlock(&event_lock);
}
/* this function needs to extract all the infos from the client, source and mount object
/* this function needs to extract all the info from the client, source and mount object
* as after return the pointers become invalid.
*/
void event_emit_clientevent(const char *trigger, client_t *client, const char *uri) {
......@@ -359,7 +359,7 @@ void event_emit_clientevent(const char *trigger, client_t *client, const char *u
event_push_reglist(event, mount->event);
config_release_config();
/* This isn't perfectly clean but is a important speedup:
/* This isn't perfectly clean but is an important speedup:
* If first element of reglist is NULL none of the above pushed in
* some registrations. If there are no registrations we can just drop
* this event now and here.
......
......@@ -55,7 +55,7 @@ static inline size_t __argvtype2offset(event_exec_argvtype_t argvtype) {
}
}
/* BEFORE RELEASE 2.4.2 DOCUMENT: Document names of possible values. */
/* BEFORE RELEASE 2.5.0 DOCUMENT: Document names of possible values. */
static inline event_exec_argvtype_t __str2argvtype(const char *str) {
if (!str)
str = "(BAD VALUE)";
......@@ -125,7 +125,7 @@ static inline void __setup_environ(ice_config_t *config, event_exec_t *self, eve
source_t *source;
char buf[80];
/* BEFORE RELEASE 2.4.2 DOCUMENT: Document all those env vars. */
/* BEFORE RELEASE 2.5.0 DOCUMENT: Document all those env vars. */
__update_environ("ICECAST_VERSION", ICECAST_VERSION_STRING);
__update_environ("ICECAST_HOSTNAME", config->hostname);
__update_environ("ICECAST_ADMIN", config->admin);
......@@ -235,8 +235,8 @@ static void _run_script (event_exec_t *self, event_t *event) {
static int event_exec_emit(void *state, event_t *event) {
event_exec_t *self = state;
#ifdef _WIN32
/* BEFORE RELEASE 2.4.2 DOCUMENT: Document this not working on win*. */
ICECAST_LOG_ERROR("<event type=\"exec\" ...> not supported on win*");
/* BEFORE RELEASE 2.5.0 DOCUMENT: Document this not working on win*. */
ICECAST_LOG_ERROR("<event type=\"exec\" ...> not supported on Windows");
#else
_run_script(self, event);
#endif
......@@ -268,7 +268,7 @@ int event_get_exec(event_registration_t *er, config_options_t *options) {
if ((cur = options)) {
do {
if (cur->name) {
/* BEFORE RELEASE 2.4.2 DOCUMENT: Document supported options:
/* BEFORE RELEASE 2.5.0 DOCUMENT: Document supported options:
* <option name="executable" value="..." />
* <option name="default_arguments" value="..." /> (for values see near top of documment)
*/
......@@ -310,7 +310,7 @@ int event_get_exec(event_registration_t *er, config_options_t *options) {
if ((cur = options)) {
do {
if (cur->type) {
/* BEFORE RELEASE 2.4.2 DOCUMENT: Document supported options:
/* BEFORE RELEASE 2.5.0 DOCUMENT: Document supported options:
* <option type="argument" value="..." />
*/
if (strcmp(cur->type, "argument") == 0) {
......
......@@ -57,7 +57,7 @@ int event_get_log(event_registration_t *er, config_options_t *options) {
continue;
if (!options->name)
continue;
/* BEFORE RELEASE 2.4.2 DOCUMENT: Document supported options:
/* BEFORE RELEASE 2.5.0 DOCUMENT: Document supported options:
* <option name="prefix" value="..." />
* <option name="level" value="..." />
*/
......
......@@ -131,7 +131,7 @@ int event_get_url(event_registration_t *er, config_options_t *options) {
continue;
if (!options->name)
continue;
/* BEFORE RELEASE 2.4.2 DOCUMENT: Document supported options:
/* BEFORE RELEASE 2.5.0 DOCUMENT: Document supported options:
* <option name="url" value="..." />
* <option name="username" value="..." />
* <option name="password" value="..." />
......
......@@ -895,7 +895,7 @@ static void source_shutdown (source_t *source)
#ifdef HAVE_STRCASESTR
if (strcasestr (expectcontinue, "100-continue") != NULL)
#else
ICECAST_LOG_WARN("OS doesn't support case insenestive substring checks...");
ICECAST_LOG_WARN("OS doesn't support case insensitive substring checks...");
if (strstr (expectcontinue, "100-continue") != NULL)
#endif
{
......
......@@ -201,8 +201,8 @@ static void destroy_yp_server (struct yp_server *server)
if (server->curl)
curl_easy_cleanup (server->curl);
if (server->mounts) ICECAST_LOG_WARN("active ypdata not freed up");
if (server->pending_mounts) ICECAST_LOG_WARN("pending ypdata not freed up");
if (server->mounts) ICECAST_LOG_WARN("active ypdata not freed");
if (server->pending_mounts) ICECAST_LOG_WARN("pending ypdata not freed");
free (server->url);
free (server->server_id);
free (server);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment