Possibly fix double newlines in ssh
This commit is contained in:
parent
a7bcb1100a
commit
62a09a4630
2
bbs.c
2
bbs.c
@ -265,7 +265,7 @@ void s_putstring(char *c) {
|
|||||||
char *ptr2;
|
char *ptr2;
|
||||||
if (!should_convert_utf8()) {
|
if (!should_convert_utf8()) {
|
||||||
if (sshBBS) {
|
if (sshBBS) {
|
||||||
puts(c);
|
fprintf(stdout, "%s", c);
|
||||||
} else {
|
} else {
|
||||||
write(gSocket, c, strlen(c));
|
write(gSocket, c, strlen(c));
|
||||||
}
|
}
|
||||||
|
6
doors.c
6
doors.c
@ -42,7 +42,7 @@ void doorchld_handler(int s)
|
|||||||
|
|
||||||
int write_door32sys(struct user_record *user) {
|
int write_door32sys(struct user_record *user) {
|
||||||
struct stat s;
|
struct stat s;
|
||||||
char buffer[256];
|
char buffer[1024];
|
||||||
FILE *fptr;
|
FILE *fptr;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
int i;
|
int i;
|
||||||
@ -53,7 +53,7 @@ int write_door32sys(struct user_record *user) {
|
|||||||
mkdir(buffer, 0755);
|
mkdir(buffer, 0755);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(buffer, "%s/node%d/door32.sys", conf.bbs_path, mynode);
|
snprintf(buffer, 1024, "%s/node%d/door32.sys", conf.bbs_path, mynode);
|
||||||
|
|
||||||
fptr = fopen(buffer, "w");
|
fptr = fopen(buffer, "w");
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ int write_door32sys(struct user_record *user) {
|
|||||||
|
|
||||||
// create dorinfo1.def
|
// create dorinfo1.def
|
||||||
|
|
||||||
sprintf(buffer, "%s/node%d", conf.bbs_path, mynode);
|
snprintf(buffer, 1024, "%s/node%d", conf.bbs_path, mynode);
|
||||||
|
|
||||||
if (stat(buffer, &s) != 0) {
|
if (stat(buffer, &s) != 0) {
|
||||||
mkdir(buffer, 0755);
|
mkdir(buffer, 0755);
|
||||||
|
Reference in New Issue
Block a user