move wanpipe's close function to the cross platform abstraction.

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@42 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris
2007-05-20 04:14:23 +00:00
parent 110d452c60
commit 3bf6d4d8f3
2 changed files with 13 additions and 7 deletions

View File

@@ -146,6 +146,18 @@ static sng_fd_t tdmv_api_open_span_chan(int span, int chan)
#endif
}
void tdmv_api_close_socket(sng_fd_t *sp)
{
if( *sp != INVALID_HANDLE_VALUE){
#if defined(__WINDOWS__)
CloseHandle(*sp);
#else
close(*sp);
#endif
*sp = INVALID_HANDLE_VALUE;
}
}
#ifdef __WINDOWS__
static int wanpipe_api_ioctl(sng_fd_t fd, wan_cmd_api_t *api_cmd)
{