Suppress 'Can't create pre-defined channel: invalid name: ""' messages

Skip predefined channel structures that have configured no name,
like the "--configtest" does.
This commit is contained in:
Alexander Barton 2011-12-04 22:30:32 +01:00
parent 8e193df973
commit 8fa92f0a24
1 changed files with 6 additions and 3 deletions

View File

@ -110,9 +110,12 @@ Channel_InitPredefined( void )
assert(channel_count == 0 || conf_chan != NULL);
for (i = 0; i < channel_count; i++, conf_chan++) {
if (!conf_chan->name[0] || !Channel_IsValidName(conf_chan->name)) {
Log(LOG_ERR, "Can't create pre-defined channel: invalid name: \"%s\"",
conf_chan->name);
if (!conf_chan->name[0])
continue;
if (!Channel_IsValidName(conf_chan->name)) {
Log(LOG_ERR,
"Can't create pre-defined channel: invalid name: \"%s\"",
conf_chan->name);
continue;
}