Fixed connection removal again
This commit is contained in:
2
Makefile
2
Makefile
@@ -2,7 +2,7 @@ SRC = $(wildcard src/*.c)
|
|||||||
OBJ = $(subst .c,.o,$(subst src,work,$(SRC)))
|
OBJ = $(subst .c,.o,$(subst src,work,$(SRC)))
|
||||||
LIBS = gnutls
|
LIBS = gnutls
|
||||||
LDFLAGS = -pie -lrt -ldl $(shell pkg-config --libs $(LIBS))
|
LDFLAGS = -pie -lrt -ldl $(shell pkg-config --libs $(LIBS))
|
||||||
CFLAGS := -O2 -pipe -Wall -Wpedantic -Wshadow -ansi -D_XOPEN_SOURCE=500 -ggdb
|
CFLAGS := -O2 -pipe -Wall -Wpedantic -Wshadow -ansi -D_XOPEN_SOURCE=500
|
||||||
CFLAGS += -Isrc/ -fpie -D_POSIX_C_SOURCE=200809L $(shell pkg-config --cflags $(LIBS))
|
CFLAGS += -Isrc/ -fpie -D_POSIX_C_SOURCE=200809L $(shell pkg-config --cflags $(LIBS))
|
||||||
INSTALLDIR := /usr/sbin
|
INSTALLDIR := /usr/sbin
|
||||||
HEADERDIR := /usr/include/
|
HEADERDIR := /usr/include/
|
||||||
|
|||||||
@@ -106,7 +106,8 @@ remove:
|
|||||||
|
|
||||||
memcpy(fds + remove, fds + replace,
|
memcpy(fds + remove, fds + replace,
|
||||||
sizeof(struct pollfd));
|
sizeof(struct pollfd));
|
||||||
memcpy(connections + remove, fds + replace,
|
memcpy(connections + remove,
|
||||||
|
connections + replace,
|
||||||
sizeof(struct pollfd));
|
sizeof(struct pollfd));
|
||||||
|
|
||||||
--pending[id];
|
--pending[id];
|
||||||
|
|||||||
Reference in New Issue
Block a user