Commit 3fb614e2 authored by Simon Morlat's avatar Simon Morlat

ortp server unlinks file.

parent 97acf505
......@@ -18,4 +18,11 @@ depcomp
autom4te.cache/
install-sh
ortp-config.h.in
ortp-config.h
ortp.spec
ortp.pc
ortp.doxygen
m4
doc
ortp.defs
stamp-h1
......@@ -411,6 +411,14 @@ int ortp_server_pipe_close_client(ortp_socket_t client){
}
int ortp_server_pipe_close(ortp_socket_t spipe){
struct sockaddr_un sa;
socklen_t len=sizeof(sa);
int err;
/*this is to retrieve the name of the pipe, in order to unlink the file*/
err=getsockname(spipe,(struct sockaddr*)&sa,&len);
if (err==0){
unlink(sa.sun_path);
}else ortp_error("getsockname(): %s",strerror(errno));
return close(spipe);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment