diff options
-rw-r--r-- | mbbsd/edit.c | 9 | ||||
-rw-r--r-- | mbbsd/talk.c | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c index d8f376fc..6b8d900e 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -999,18 +999,13 @@ write_file(char *fpath, int saveheader, int *islocal) } if (!aborted) { - int tempfd; if (saveheader && !(curredit & EDIT_MAIL) && check_quote()) return KEEP_EDITING; - if (*fpath) { - tempfd = open(fpath, O_WRONLY | O_CREAT | O_TRUNC, 0600); - }else{ + if (!(*fpath)) setuserfile(fpath, "ve_XXXXXX"); - tempfd = mkstemp(fpath); - } - if ((fp = fdopen(tempfd, "w")) == NULL) { + if ((fp = fopen(fpath, "w")) == NULL) { indigestion(5); abort_bbs(0); } diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 2fadd2de..6864faf9 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -2636,6 +2636,10 @@ talkreply(void) page_requestor, sig_des[sig]); getdata(0, 0, genbuf, buf, sizeof(buf), LCECHO); a = reply_connection_request(uip); + if (a < 0) { + clear(); + return; + } if (!buf[0] || !strchr("yabcdef12", buf[0])) buf[0] = 'n'; |