Rename MAX_SERVER_NAME_LEN to MAX_SERVER_ADDRESS_LEN

This commit is contained in:
Johan Wikman
2017-06-19 12:58:31 +03:00
parent 2f090a22fe
commit 32cd28daf2
4 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,7 @@
MXS_BEGIN_DECLS MXS_BEGIN_DECLS
#define MAX_SERVER_NAME_LEN 1024 #define MAX_SERVER_ADDRESS_LEN 1024
#define MAX_SERVER_MONUSER_LEN 1024 #define MAX_SERVER_MONUSER_LEN 1024
#define MAX_SERVER_MONPW_LEN 1024 #define MAX_SERVER_MONPW_LEN 1024
#define MAX_NUM_SLAVES 128 /**< Maximum number of slaves under a single server*/ #define MAX_NUM_SLAVES 128 /**< Maximum number of slaves under a single server*/
@ -74,7 +74,7 @@ typedef struct server
#endif #endif
SPINLOCK lock; /**< Common access lock */ SPINLOCK lock; /**< Common access lock */
char *unique_name; /**< Unique name for the server */ char *unique_name; /**< Unique name for the server */
char name[MAX_SERVER_NAME_LEN]; /**< Server name/IP address*/ char name[MAX_SERVER_ADDRESS_LEN]; /**< Server name/IP address*/
unsigned short port; /**< Port to listen on */ unsigned short port; /**< Port to listen on */
char *protocol; /**< Protocol module to use */ char *protocol; /**< Protocol module to use */
char *authenticator; /**< Authenticator module name */ char *authenticator; /**< Authenticator module name */

View File

@ -972,7 +972,7 @@ static const char* mon_get_event_name(MXS_MONITOR_SERVERS* node)
static void mon_append_node_names(MXS_MONITOR_SERVERS* servers, char* dest, int len, int status) static void mon_append_node_names(MXS_MONITOR_SERVERS* servers, char* dest, int len, int status)
{ {
const char *separator = ""; const char *separator = "";
char arr[MAX_SERVER_NAME_LEN + 64]; // Some extra space for port and separator char arr[MAX_SERVER_ADDRESS_LEN + 64]; // Some extra space for port and separator
dest[0] = '\0'; dest[0] = '\0';
while (servers && len) while (servers && len)

View File

@ -505,7 +505,7 @@ closeSession(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session)
static void log_closed_session(mysql_server_cmd_t mysql_command, bool is_closed, static void log_closed_session(mysql_server_cmd_t mysql_command, bool is_closed,
SERVER_REF *ref) SERVER_REF *ref)
{ {
char msg[MAX_SERVER_NAME_LEN + 200] = ""; // Extra space for message char msg[MAX_SERVER_ADDRESS_LEN + 200] = ""; // Extra space for message
if (is_closed) if (is_closed)
{ {

View File

@ -1118,7 +1118,7 @@ bool handle_slave_is_target(ROUTER_INSTANCE *inst, ROUTER_CLIENT_SES *rses,
static void log_master_routing_failure(ROUTER_CLIENT_SES *rses, bool found, static void log_master_routing_failure(ROUTER_CLIENT_SES *rses, bool found,
DCB *master_dcb, DCB *curr_master_dcb) DCB *master_dcb, DCB *curr_master_dcb)
{ {
char errmsg[MAX_SERVER_NAME_LEN * 2 + 100]; // Extra space for error message char errmsg[MAX_SERVER_ADDRESS_LEN * 2 + 100]; // Extra space for error message
if (!found) if (!found)
{ {