| 55 if( (getsockopt(fd, SOL_SOCKET, SO_TYPE, (void*)&optval, &optlen)) == SOCKET_ERROR ) { |
55 if( (getsockopt(fd, SOL_SOCKET, SO_TYPE, (void*)&optval, &optlen)) == SOCKET_ERROR ) { |
| 56 int error = WSAGetLastError(); |
56 int error = WSAGetLastError(); |
| 57 if( error == WSAENOTSOCK ) |
57 if( error == WSAENOTSOCK ) |
| 58 return FALSE; |
58 return FALSE; |
| 59 else { |
59 else { |
| 60 debug_printf("wgaim_read: getsockopt returned error: %d\n", error); |
60 gaim_debug(GAIM_DEBUG_WARNING, "wgaim", "wgaim_is_socket: getsockopt returned error: %d\n", error); |
| 61 return FALSE; |
61 return FALSE; |
| 62 } |
62 } |
| 63 } |
63 } |
| 64 return TRUE; |
64 return TRUE; |
| 65 } |
65 } |
| 327 else { |
327 else { |
| 328 /* This is not quite right.. If newname is empty and |
328 /* This is not quite right.. If newname is empty and |
| 329 is not a sub dir of oldname, newname should be |
329 is not a sub dir of oldname, newname should be |
| 330 deleted and oldname should be renamed. |
330 deleted and oldname should be renamed. |
| 331 */ |
331 */ |
| 332 debug_printf("Warning: wgaim_rename does not behave here as it should\n"); |
332 gaim_debug(GAIM_DEBUG_WARNING, "wgaim", "wgaim_rename does not behave here as it should\n"); |
| 333 return rename(oldname, newname); |
333 return rename(oldname, newname); |
| 334 } |
334 } |
| 335 } |
335 } |
| 336 /* oldname is not a dir */ |
336 /* oldname is not a dir */ |
| 337 else { |
337 else { |