Fix SERVERPORT variable (Issue
@@ -2565,6 +2565,10 @@ load_system(const char *conf) /* I - Configuration file */
*ptr++ = '\0';
port = atoi(ptr);
}
+ else if (DefaultPort)
+ {
+ port = DefaultPort;
+ }
else
{
#ifdef _WIN32
@@ -2574,6 +2578,9 @@ load_system(const char *conf) /* I - Configuration file */
#endif /* _WIN32 */
}
+ if (!DefaultPort)
+ DefaultPort = port;
+
if (!serverCreateListeners(host, port))
{
status = 0;
