diff options
Diffstat (limited to 'vio')
-rw-r--r-- | vio/vio.c | 8 | ||||
-rw-r--r-- | vio/viosocket.c | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/vio/vio.c b/vio/vio.c index aed99e72d54..6e2ec3f674b 100644 --- a/vio/vio.c +++ b/vio/vio.c @@ -213,9 +213,7 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, uint flags) if ((vio = (Vio*) my_malloc(sizeof(*vio),MYF(MY_WME)))) { vio_init(vio, type, sd, 0, flags); - sprintf(vio->desc, - (vio->type == VIO_TYPE_SOCKET ? "socket (%d)" : "TCP/IP (%d)"), - vio->sd); + vio->desc= (vio->type == VIO_TYPE_SOCKET ? "socket" : "TCP/IP"); #if !defined(__WIN__) #if !defined(NO_FCNTL_NONBLOCK) /* @@ -257,7 +255,7 @@ Vio *vio_new_win32pipe(HANDLE hPipe) if ((vio = (Vio*) my_malloc(sizeof(Vio),MYF(MY_WME)))) { vio_init(vio, VIO_TYPE_NAMEDPIPE, 0, hPipe, VIO_LOCALHOST); - strmov(vio->desc, "named pipe"); + vio->desc= "named pipe"; } DBUG_RETURN(vio); } @@ -282,7 +280,7 @@ Vio *vio_new_win32shared_memory(HANDLE handle_file_map, HANDLE handle_map, vio->event_conn_closed= event_conn_closed; vio->shared_memory_remain= 0; vio->shared_memory_pos= handle_map; - strmov(vio->desc, "shared memory"); + vio->desc= "shared memory"; } DBUG_RETURN(vio); } diff --git a/vio/viosocket.c b/vio/viosocket.c index baefa1c6d06..960b49276a8 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -322,7 +322,9 @@ int vio_fastsend(Vio * vio __attribute__((unused))) } if (r) { - DBUG_PRINT("warning", ("Couldn't set socket option for fast send")); + DBUG_PRINT("warning", + ("Couldn't set socket option for fast send, error %d", + socket_errno)); r= -1; } DBUG_PRINT("exit", ("%d", r)); @@ -819,7 +821,7 @@ void vio_timeout(Vio *vio, uint which, uint timeout) #if defined(SO_SNDTIMEO) && defined(SO_RCVTIMEO) int r; DBUG_ENTER("vio_timeout"); - + DBUG_PRINT("enter", ("which: %u timeout: %u", which, timeout)); { #ifdef __WIN__ /* Windows expects time in milliseconds as int */ @@ -846,6 +848,7 @@ void vio_timeout(Vio *vio, uint which, uint timeout) Platforms not suporting setting of socket timeout should either use thr_alarm or just run without read/write timeout(s) */ + DBUG_PRINT("warning", ("timeout ignored")); #endif /* Make timeout values available for async operations. */ if (which) |