summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/mbuf.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-06-25 19:30:05 +0000
committerbrian <brian@FreeBSD.org>1997-06-25 19:30:05 +0000
commitfef65421d3583585ef484383e7a06b2d6c75a1fb (patch)
tree2b34efd1359d865127c8be005bf629a29a898a4e /usr.sbin/ppp/mbuf.c
parent988f978710326fc294e3ebe6b7231a5b2807c6f8 (diff)
downloadFreeBSD-src-fef65421d3583585ef484383e7a06b2d6c75a1fb.zip
FreeBSD-src-fef65421d3583585ef484383e7a06b2d6c75a1fb.tar.gz
Add "set server" to control the server socket.
Catch SIGUSR1 to re-init listening socket. Document signal behaviour. Add missing '\n's to LogPrintf(LogWARN,...) Main() returns int not void. AF_LOCAL ideal suggested a long time ago by: joerg
Diffstat (limited to 'usr.sbin/ppp/mbuf.c')
-rw-r--r--usr.sbin/ppp/mbuf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ppp/mbuf.c b/usr.sbin/ppp/mbuf.c
index 3fbaebe..1343b7e 100644
--- a/usr.sbin/ppp/mbuf.c
+++ b/usr.sbin/ppp/mbuf.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: mbuf.c,v 1.6 1997/05/10 01:22:15 brian Exp $
+ * $Id: mbuf.c,v 1.7 1997/06/09 03:27:29 brian Exp $
*
*/
#include <sys/types.h>
@@ -27,6 +27,7 @@
#include "defs.h"
#include "loadalias.h"
#include "vars.h"
+#include "server.h"
struct memmap {
struct mbuf *queue;
@@ -59,12 +60,14 @@ int type;
bp = (struct mbuf *)malloc(sizeof(struct mbuf));
if (bp == NULL) {
LogPrintf(LogALERT, "failed to allocate memory: %u\n", sizeof(struct mbuf));
+ ServerClose();
exit(1);
}
bzero(bp, sizeof(struct mbuf));
p = (u_char *)malloc(cnt);
if (p == NULL) {
LogPrintf(LogALERT, "failed to allocate memory: %d\n", cnt);
+ ServerClose();
exit(1);
}
MemMap[type].count += cnt;
OpenPOWER on IntegriCloud