Fixed config failure when listener only has a socket and no port.
This commit is contained in:
@ -943,7 +943,10 @@ process_config_context(CONFIG_CONTEXT *context)
|
||||
gateway.id = (unsigned long) (serv_addr.sin_addr.s_addr + (port != NULL ? atoi(port) : 0 + getpid()));
|
||||
}
|
||||
|
||||
if (service && socket && protocol) {
|
||||
if(service && protocol && (socket || port))
|
||||
{
|
||||
if (socket)
|
||||
{
|
||||
CONFIG_CONTEXT *ptr = context;
|
||||
while (ptr && strcmp(ptr->object, service) != 0)
|
||||
ptr = ptr->next;
|
||||
@ -953,7 +956,9 @@ process_config_context(CONFIG_CONTEXT *context)
|
||||
protocol,
|
||||
socket,
|
||||
0);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : Listener '%s', "
|
||||
@ -964,7 +969,8 @@ process_config_context(CONFIG_CONTEXT *context)
|
||||
}
|
||||
}
|
||||
|
||||
if (service && port && protocol) {
|
||||
if (port)
|
||||
{
|
||||
CONFIG_CONTEXT *ptr = context;
|
||||
while (ptr && strcmp(ptr->object, service) != 0)
|
||||
ptr = ptr->next;
|
||||
@ -986,11 +992,12 @@ process_config_context(CONFIG_CONTEXT *context)
|
||||
error_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : Listener '%s' is misisng a "
|
||||
"Error : Listener '%s' is missing a "
|
||||
"required "
|
||||
"parameter. A Listener must have a "
|
||||
"service, port and protocol defined.",
|
||||
|
||||
Reference in New Issue
Block a user