use WP_INVALID_SOCKET for invalid handles.
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@46 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
e8c38d85a8
commit
65cc17159c
|
@ -148,13 +148,13 @@ static sng_fd_t tdmv_api_open_span_chan(int span, int chan)
|
|||
|
||||
void tdmv_api_close_socket(sng_fd_t *sp)
|
||||
{
|
||||
if( *sp != INVALID_HANDLE_VALUE){
|
||||
if( *sp != WP_INVALID_SOCKET){
|
||||
#if defined(__WINDOWS__)
|
||||
CloseHandle(*sp);
|
||||
#else
|
||||
close(*sp);
|
||||
#endif
|
||||
*sp = INVALID_HANDLE_VALUE;
|
||||
*sp = WP_INVALID_SOCKET;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue