alpine/alpine-gcc44.diff

41 lines
993 B
Diff
Raw Normal View History

--- ./imap/src/osdep/unix/dummy.c 2009/06/02 09:53:30 1.1
+++ ./imap/src/osdep/unix/dummy.c 2009/06/02 10:04:31
@@ -723,6 +723,17 @@
return NIL;
}
+static MAILSTREAM *dummy_rewrite_code(MAILSTREAM *ts)
+{
+ if (ts)
+ return ts;
+
+ ts = default_proto (NIL);
+ if (!(*ts->dtb->create)(ts,"INBOX"))
+ return NIL;
+
+ return ts;
+}
/* Dummy append message string
* Accepts: mail stream
@@ -742,8 +753,7 @@
/* append to INBOX? */
if (!compare_cstring (mailbox,"INBOX")) {
/* yes, if no empty proto try creating */
- if (!ts && !(*(ts = default_proto (NIL))->dtb->create) (ts,"INBOX"))
- ts = NIL;
+ ts = dummy_rewrite_code(ts);
}
else if (dummy_file (tmp,mailbox) && ((fd = open (tmp,O_RDONLY,NIL)) < 0)) {
if ((e = errno) == ENOENT) /* failed, was it no such file? */
--- pith/send.c 2009/06/02 10:04:13 1.11
+++ pith/send.c 2009/06/02 10:04:31
@@ -1569,6 +1569,7 @@
pf->textbuf = cpystr(value);
}
}
+ return 0;
}