Cleanup of server reading code, preparation, for dynamic reading from files.

This commit is contained in:
Simon Kelley
2014-02-18 22:30:30 +00:00
parent de73a497ca
commit d68c2ca2b7
4 changed files with 145 additions and 176 deletions

View File

@@ -689,6 +689,13 @@ char *parse_server(char *arg, union mysockaddr *addr, union mysockaddr *source_a
char *scope_id;
#endif
if (!arg || strlen(arg) == 0)
{
*flags |= SERV_NO_ADDR;
*interface = 0;
return NULL;
}
if ((source = split_chr(arg, '@')) && /* is there a source. */
(portno = split_chr(source, '#')) &&
!atoi_check16(portno, &source_port))