You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Fix for CONC-135: Return value of mysql_get_socket() indicating "no
socket" not defined mysql_get_socket now returns in case of error: MARIADB_INVALID_SOCKET instead of INVALID_SOCKET (which isn't defined on several OS). MARIADB_INVALID_SOCKET is defined as -1.
This commit is contained in:
@@ -331,6 +331,7 @@ typedef struct st_mysql_time
|
||||
|
||||
#define AUTO_SEC_PART_DIGITS 31
|
||||
#define SEC_PART_DIGITS 6
|
||||
#define MARIADB_INVALID_SOCKET -1
|
||||
|
||||
/* Ansynchronous API constants */
|
||||
#define MYSQL_WAIT_READ 1
|
||||
|
@@ -3551,7 +3551,7 @@ mysql_get_socket(const MYSQL *mysql)
|
||||
{
|
||||
if (mysql->net.vio)
|
||||
return vio_fd(mysql->net.vio);
|
||||
return INVALID_SOCKET;
|
||||
return MARIADB_INVALID_SOCKET;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user