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
3685804c98
commit
20c41323a7
|
@ -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)
|
void tdmv_api_close_socket(sng_fd_t *sp)
|
||||||
{
|
{
|
||||||
if( *sp != INVALID_HANDLE_VALUE){
|
if( *sp != WP_INVALID_SOCKET){
|
||||||
#if defined(__WINDOWS__)
|
#if defined(__WINDOWS__)
|
||||||
CloseHandle(*sp);
|
CloseHandle(*sp);
|
||||||
#else
|
#else
|
||||||
close(*sp);
|
close(*sp);
|
||||||
#endif
|
#endif
|
||||||
*sp = INVALID_HANDLE_VALUE;
|
*sp = WP_INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue