Fix bug #77 - Error in ACL command parsing.

This commit is contained in:
Jan Vidar Krey 2009-08-31 19:39:09 +02:00
parent aeba7188c0
commit 1e380ecf0f
2 changed files with 12 additions and 17 deletions

View File

@ -185,18 +185,10 @@ static int acl_parse_line(char* line, int line_count, void* ptr_data)
pos[0] = 0;
}
line = strip_white_space(line);
if (!*line)
return 0;
LOG_DEBUG("acl_parse_line(): '%s'", line);
line = strip_white_space(line);
if (!*line)
{
LOG_FATAL("ACL parse error on line %d", line_count);
return -1;
}
LOG_DEBUG("acl_parse_line: '%s'", line);
ACL_ADD_USER("bot", handle->users, cred_bot);

View File

@ -46,10 +46,13 @@ char* strip_white_space(char* string)
{
char* pos;
if (!string)
return "";
while (string[0] && is_white_space(string[0])) string++;
if (!*string)
return 0;
return string;
/* Strip appending whitespace */
pos = &string[strlen(string)-1];