Attempt to fix line endings in stdio doors
This commit is contained in:
parent
90986ffbe9
commit
d315c1eaa7
5
doors.c
5
doors.c
@ -200,6 +200,11 @@ void rundoor(int socket, struct user_record *user, char *cmd, int stdio) {
|
|||||||
disconnect(socket);
|
disconnect(socket);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (c == '\r') {
|
||||||
|
c == '\n';
|
||||||
|
} else if (c == '\n' || c == '\0') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
write(master, &c, 1);
|
write(master, &c, 1);
|
||||||
} else if (FD_ISSET(master, &fdset)) {
|
} else if (FD_ISSET(master, &fdset)) {
|
||||||
len = read(master, &c, 1);
|
len = read(master, &c, 1);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CC = gcc $(CPPFLAGS) $(CFLAGS) -D__LINUX__ $(LDFLAGS) -Wall
|
CC = cc $(CPPFLAGS) $(CFLAGS) -D__LINUX__ $(LDFLAGS) -Wall
|
||||||
AR = ar -ru
|
AR = ar -ru
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user