Ah, I diffed svn, instead of the 2.0.4.release. Here goes...
Kasper Haagensen wrote:
sorry... did so:
[EMAIL PROTECTED] dbmail-2.0.4]# tail +8 01_quota.dpatch |patch -p1
patching file pipe.c
patching file sort/sort.c
Hunk #1 FAILED at 46.
1 out of 1 hunk FAILED -- saving rejects to file sort/sort.c.rej
patching file sort.h
and still...
sort.o
sort.c:68: error: conflicting types for 'sort_and_deliver'
../sort.h:49: error: previous declaration of 'sort_and_deliver' was here
sort.c:68: error: conflicting types for 'sort_and_deliver'
../sort.h:49: error: previous declaration of 'sort_and_deliver' was here
sort.c: In function `sort_and_deliver':
sort.c:83: error: `SORT_FAILURE' undeclared (first use in this function)
sort.c:83: error: (Each undeclared identifier is reported only once
sort.c:83: error: for each function it appears in.)
sort.c:92: error: `SORT_OVER_QUOTA' undeclared (first use in this function)
sort.c:98: error: `SORT_WEIRD_ERROR' undeclared (first use in this
function)
sort.c:103: error: `SORT_SUCCESS' undeclared (first use in this function)
make[2]: *** [sort.lo] Error 1
make[2]: Leaving directory `/home/kasper/download/dbmail-2.0.4/sort'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kasper/download/dbmail-2.0.4'
make: *** [all-recursive-am] Error 2
Paul J Stevens wrote:
tail +8 01_quota.dpatch |patch -p1
Kasper Haagensen wrote:
[EMAIL PROTECTED] dbmail-2.0.4]# ./01_quota.dpatch
/bin/sh: /usr/share/dpatch/dpatch-run: No such file or directory
kasper
Kasper Haagensen wrote:
Yes... how should i use it...
Can see, what it should be replace with or how...
kasper
Paul J Stevens wrote:
Try the patch available at:
http://www.dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0000182
Kasper Haagensen wrote:
Hei
Just download the 2.0.4 for install, and this problem turned
out.... any idea?
kasper
Making all in sort
make[2]: Entering directory `/home/kasper/download/dbmail-2.0.4/sort'
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
-I.. -g -O2 -W -Wall -Wpointer-arith -Wstrict-prototypes -c
sort.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -W -Wall -Wpointer-arith
-Wstrict-prototypes -Wp,-MD,.deps/sort.pp -c sort.c -fPIC -DPIC
-o .libs/sort.o
sort.c:68: error: conflicting types for 'sort_and_deliver'
../sort.h:59: error: previous declaration of 'sort_and_deliver'
was here
sort.c:68: error: conflicting types for 'sort_and_deliver'
../sort.h:59: error: previous declaration of 'sort_and_deliver'
was here
make[2]: *** [sort.lo] Error 1
make[2]: Leaving directory `/home/kasper/download/dbmail-2.0.4/sort'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kasper/download/dbmail-2.0.4'
make: *** [all-recursive-am] Error 2
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev
--
________________________________________________________________
Paul Stevens [EMAIL PROTECTED]
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl
diff -x .svn -x 01_quota.dpatch -x stamp-h1 -urN
/usr/src/Packages/dbmail2/dbmail-2.0.4/pipe.c dbmail-2.0/pipe.c
--- /usr/src/Packages/dbmail2/dbmail-2.0.4/pipe.c 2005-03-14
12:54:00.000000000 +0100
+++ dbmail-2.0/pipe.c 2005-03-18 13:40:51.000000000 +0100
@@ -553,12 +553,11 @@
}
/* Loop through the users list. */
- for (element = list_getstart(dsnusers); element != NULL;
- element = element->nextnode) {
+ for (element = list_getstart(dsnusers); element != NULL; element =
element->nextnode) {
struct element *userid_elem;
int has_2 = 0, has_4 = 0, has_5 = 0, has_5_2 = 0;
- deliver_to_user_t *delivery =
- (deliver_to_user_t *) element->data;
+ deliver_to_user_t *delivery = (deliver_to_user_t *)
element->data;
+ dsn_class_t dsn_result;
/* If there was already an error during resolving,
* let's skip this delivery. */
@@ -571,37 +570,36 @@
userid_elem != NULL;
userid_elem = userid_elem->nextnode) {
u64_t useridnr = *(u64_t *) userid_elem->data;
+
trace(TRACE_DEBUG,
"%s, %s: calling sort_and_deliver for useridnr
[%llu]",
__FILE__, __func__, useridnr);
-
- switch (sort_and_deliver(tmpmsgidnr,
- header, headersize,
- msgsize, rfcsize,
- useridnr,
- delivery->mailbox)) {
- case SORT_SUCCESS:
+
+ dsn_result = sort_and_deliver(tmpmsgidnr, msgsize,
useridnr, delivery->mailbox);
+
+ switch (dsn_result) {
+ case DSN_CLASS_OK:
/* Indicate success. */
trace(TRACE_DEBUG,
"%s, %s: successful sort_and_deliver for
useridnr [%llu]",
__FILE__, __func__, useridnr);
has_2 = 1;
break;
- case SORT_FAILURE:
+ case DSN_CLASS_FAIL:
/* Indicate permanent failure. */
trace(TRACE_ERROR,
"%s, %s: permanent failure
sort_and_deliver for useridnr [%llu]",
__FILE__, __func__, useridnr);
has_5 = 1;
break;
- case SORT_OVER_QUOTA:
+ case DSN_CLASS_QUOTA:
/* Indicate over quota. */
trace(TRACE_ERROR,
"%s, %s: temporary failure
sort_and_deliver for useridnr [%llu]",
__FILE__, __func__, useridnr);
has_5_2 = 1;
break;
- case SORT_WEIRD_ERROR:
+ case DSN_CLASS_TEMP:
default:
/* Assume a temporary failure */
trace(TRACE_ERROR,
diff -x .svn -x 01_quota.dpatch -x stamp-h1 -urN
/usr/src/Packages/dbmail2/dbmail-2.0.4/sort/sort.c dbmail-2.0/sort/sort.c
--- /usr/src/Packages/dbmail2/dbmail-2.0.4/sort/sort.c 2005-03-17
21:46:27.000000000 +0100
+++ dbmail-2.0/sort/sort.c 2005-03-18 13:40:51.000000000 +0100
@@ -1,4 +1,4 @@
-/* $Id: sort.c 1673 2005-03-14 11:54:00Z paul $
+/* $Id: sort.c 1685 2005-03-17 21:05:07Z paul $
Copyright (C) 2004 Aaron Stone aaron at serendipity dot cx
@@ -46,61 +46,40 @@
#include <unistd.h>
#include "dbmd5.h"
#include "misc.h"
+#include "dsn.h"
#ifdef SIEVE
#include "sortsieve.h"
#endif
-/* Run the user's sorting rules on this message
- * Retrieve the action list as either
- * a linked list of things to do, or a
- * single thing to do. Not sure yet...
- *
- * Then do it!
- * */
-sort_result_t sort_and_deliver(u64_t msgidnr,
- const char *header UNUSED,
- u64_t headersize UNUSED,
- u64_t totalmsgsize,
- u64_t totalrfcsize UNUSED,
- u64_t useridnr UNUSED,
- const char *mailbox)
+dsn_class_t sort_and_deliver(u64_t msgidnr, u64_t msgsize, u64_t useridnr,
const char *mailbox)
{
u64_t mboxidnr, newmsgidnr;
if (mailbox == NULL)
mailbox = "INBOX";
- /* There used to be code that handled the result
- * actions of a Sieve script. Since it wasn't being
- * used as of DBMail 2.0.3, I pulled it out.
- * Aaron Stone, 21 Jan 2005. */
-
- /* Did we fail to create the mailbox? */
if (db_find_create_mailbox(mailbox, useridnr, &mboxidnr) != 0) {
- /* Serious failure situation! */
trace(TRACE_ERROR, "sort_and_deliver(): INBOX not found and
could not be created.");
- return SORT_FAILURE;
+ return DSN_CLASS_FAIL;
} else {
switch (db_copymsg(msgidnr, mboxidnr, useridnr, &newmsgidnr)) {
case -2:
- /* Couldn't deliver because the quotum is exceeded. */
trace(TRACE_MESSAGE, "%s, %s: error copying message to
user [%llu],"
"maxmail exceeded",
__FILE__, __func__,
useridnr);
- return SORT_OVER_QUOTA;
+ return DSN_CLASS_QUOTA;
case -1:
- /* Couldn't deliver because something something went
wrong. */
trace(TRACE_ERROR, "%s, %s: error copying message to
user [%llu]",
__FILE__, __func__,
useridnr);
- return SORT_WEIRD_ERROR;
+ return DSN_CLASS_TEMP;
default:
trace(TRACE_MESSAGE, "%s, %s: message id=%llu,
size=%llu is inserted",
__FILE__, __func__,
- newmsgidnr, totalmsgsize);
- return SORT_SUCCESS;
+ newmsgidnr, msgsize);
+ return DSN_CLASS_OK;
}
}
}
diff -x .svn -x 01_quota.dpatch -x stamp-h1 -urN
/usr/src/Packages/dbmail2/dbmail-2.0.4/sort.h dbmail-2.0/sort.h
--- /usr/src/Packages/dbmail2/dbmail-2.0.4/sort.h 2005-03-14
12:54:00.000000000 +0100
+++ dbmail-2.0/sort.h 2005-03-18 13:40:51.000000000 +0100
@@ -46,16 +46,6 @@
char *message;
} sort_action_t;
-typedef enum {
- SORT_SUCCESS = 0,
- SORT_OVER_QUOTA,
- SORT_WEIRD_ERROR,
- SORT_FAILURE
-} sort_result_t;
-
-sort_result_t sort_and_deliver(u64_t msgidnr,
- const char *header, u64_t headersize,
- u64_t msgsize, u64_t rfcsize,
- u64_t useridnr, const char *mailbox);
+dsn_class_t sort_and_deliver(u64_t msgidnr, u64_t msgsize, u64_t useridnr,
const char *mailbox);
#endif /* #ifndef _SORTING_H */