Correctly drop existing connections when reopening the diagnostic
socket.
This commit is contained in:
parent
6bc6d9631d
commit
a39fd2143c
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: log.c,v 1.34 1998/08/09 15:34:11 brian Exp $
|
||||
* $Id: log.c,v 1.35 1998/08/21 18:10:14 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -132,15 +132,21 @@ log_UnRegisterPrompt(struct prompt *prompt)
|
||||
void
|
||||
log_DestroyPrompts(struct server *s)
|
||||
{
|
||||
struct prompt *p, *pn;
|
||||
struct prompt *p, *pn, *pl;
|
||||
|
||||
p = promptlist;
|
||||
pl = NULL;
|
||||
while (p) {
|
||||
pn = p->next;
|
||||
if (s && p->owner != s) {
|
||||
if (s && p->owner == s) {
|
||||
if (pl)
|
||||
pl->next = p->next;
|
||||
else
|
||||
promptlist = p->next;
|
||||
p->next = NULL;
|
||||
prompt_Destroy(p, 1);
|
||||
}
|
||||
} else
|
||||
pl = p;
|
||||
p = pn;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $Id: ppp.8,v 1.153 1999/03/03 23:00:40 brian Exp $
|
||||
.\" $Id: ppp.8,v 1.154 1999/03/04 17:42:15 brian Exp $
|
||||
.Dd 20 September 1995
|
||||
.nr XX \w'\fC00'
|
||||
.Os FreeBSD
|
||||
@ -3981,9 +3981,9 @@ to close any existing socket.
|
||||
If you wish to specify a local domain socket,
|
||||
.Ar LocalName
|
||||
must be specified as an absolute file name, otherwise it is assumed
|
||||
to be the name or number of a TCP port. You may specify the octal umask that
|
||||
should be used with local domain sockets as a four character octal number
|
||||
beginning with
|
||||
to be the name or number of a TCP port. You must specify the octal umask
|
||||
that should be used with local domain sockets as a four character octal
|
||||
number beginning with
|
||||
.Sq 0 .
|
||||
Refer to
|
||||
.Xr umask 2
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $Id: ppp.8,v 1.153 1999/03/03 23:00:40 brian Exp $
|
||||
.\" $Id: ppp.8,v 1.154 1999/03/04 17:42:15 brian Exp $
|
||||
.Dd 20 September 1995
|
||||
.nr XX \w'\fC00'
|
||||
.Os FreeBSD
|
||||
@ -3981,9 +3981,9 @@ to close any existing socket.
|
||||
If you wish to specify a local domain socket,
|
||||
.Ar LocalName
|
||||
must be specified as an absolute file name, otherwise it is assumed
|
||||
to be the name or number of a TCP port. You may specify the octal umask that
|
||||
should be used with local domain sockets as a four character octal number
|
||||
beginning with
|
||||
to be the name or number of a TCP port. You must specify the octal umask
|
||||
that should be used with local domain sockets as a four character octal
|
||||
number beginning with
|
||||
.Sq 0 .
|
||||
Refer to
|
||||
.Xr umask 2
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: server.c,v 1.22 1998/06/27 14:18:10 brian Exp $
|
||||
* $Id: server.c,v 1.23 1998/08/02 13:01:16 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -191,6 +191,7 @@ server_LocalOpen(struct bundle *bundle, const char *name, mode_t mask)
|
||||
return 0;
|
||||
}
|
||||
|
||||
server_Close(bundle);
|
||||
memset(&server.ifsun, '\0', sizeof server.ifsun);
|
||||
server.ifsun.sun_len = strlen(name);
|
||||
if (server.ifsun.sun_len > sizeof server.ifsun.sun_path - 1) {
|
||||
@ -223,7 +224,6 @@ server_LocalOpen(struct bundle *bundle, const char *name, mode_t mask)
|
||||
ID0unlink(name);
|
||||
return 5;
|
||||
}
|
||||
server_Close(bundle);
|
||||
server.fd = s;
|
||||
server.rm = server.ifsun.sun_path;
|
||||
log_Printf(LogPHASE, "Listening at local socket %s.\n", name);
|
||||
|
Loading…
Reference in New Issue
Block a user