It's a pretty big dependency if we use it just for linked lists. I was thinking more of using it for quite a lot things (The lexical scanner stuff is also quite nice).

I've also found a library that we'd probably like to use, called GMime (http://spruce.sourceforge.net/gmime/), which we can use a message parser. The current message parsing code works, but even Roel, who wrote it, cannot understand all parts of it. I don't like having code in our tree that we do not understand, but have to fix when it breaks for some reason.

GMime has a dependency on GLib.

In general, I always like to use as many functionality as possible from libraries. Call it laziness ;)

Anyway, I guess this is something we should discuss a lot more, because having a small number of dependencies also has its virtues of course.

Ilja


Aaron Stone wrote:

Glib is a pretty big external dependency just for a linked list! I'm sure that
they also have MD5 functions and all sorts of other goodies, but we're in good
shape for now... IMHO, it's pretty nice that we only have to worry about
having MySQL or PostgreSQL and optionally LDAP or libSieve to link with.
Aaron


Ilja Booij <[EMAIL PROTECTED]> said:


"Funny" indeed.

I've changed the function to use the dbmail_list_reverse() name. I guess this won't be a problem in the long run, because I think we should use a library like glib (http://www.gtk.org) to provide functions/utilies like linked lists.

I'm still looking at the double header stuff.

Ilja

Aaron Stone wrote:


Well, isn't that the funniest thing? My MySQL links just fine but indeed does
have these headers. It's awfully nice of them to be providing a common list
data structure for the world to use... but not using standard library naming
conventions and barging into other people's namespaces is just rude!

Aaron


""Ed K."" <[EMAIL PROTECTED]> said:



I've installed the mysql from:




http://www.mysql.com/get/Downloads/MySQL-4.1/mysql-standard-4.1.1-alpha-pc-linux-i686.tar.gz/from/pick

fyi: It is the binary install, with only static libraries.


from the mysql source:


grep -i list_reverse /usr/local/mysql/include/*

/usr/local/mysql/include/my_list.h:extern LIST *list_reverse(LIST *root);

ed

On Tue, 9 Mar 2004, Aaron Stone wrote:



What version of MySQL are you linking with? There were a couple of versions
that were polluting the namespace, IIRC, as list_reverse is absolutely not a
symbol that libmysql.so should be exporting.

Looks like you're right about the double headers, but I'm not familiar enough
with that code to really comment on it. Ilja's game on that one ;-)

Aaron


""Ed K."" <[EMAIL PROTECTED]> said:



I have been tracking down a forward problem, see thread starting here:
http://mailman.fastxs.net/pipermail/dbmail/2004-March/004366.html

Anyway I have forwarding working now, but I don't know if I've missed

something.


Also, Here is a patch to allow for linking against the mysql server. I don't

know why


this wasn't fixed in rc3?

So, my question is: Why was the header put in the message in forward.c and

in db.c?


removing from forward.c allows for mail to forwaord properly without

duplicate headers.


ed


diff -c -r dbmail-2.0rc3/forward.c dbmail-2.0rc3-ed/forward.c
*** dbmail-2.0rc3/forward.c     2004-03-03 04:30:07.000000000 -0500
--- dbmail-2.0rc3-ed/forward.c  2004-03-08 15:49:45.000000000 -0500
***************
*** 128,134 ****
            }

          /* first send header if this is a direct pipe through */
!           fprintf (pipe, "%s", header);
          trace(TRACE_DEBUG, "forward(): wrote header to pipe");

        trace(TRACE_INFO, "forward(): sending message id number [%llu] to

forward pipe", msgidnr);


--- 128,134 ----
            }

          /* first send header if this is a direct pipe through */
!           //fprintf (pipe, "%s", header);
          trace(TRACE_DEBUG, "forward(): wrote header to pipe");

        trace(TRACE_INFO, "forward(): sending message id number [%llu] to

forward pipe", msgidnr);


diff -c -r dbmail-2.0rc3/imapcommands.c dbmail-2.0rc3-ed/imapcommands.c
*** dbmail-2.0rc3/imapcommands.c        2004-01-30 11:24:35.000000000 -0500
--- dbmail-2.0rc3-ed/imapcommands.c     2004-03-07 12:08:42.000000000 -0500
***************
*** 2047,2053 ****
      }
    }

!   fetch_list.start = list_reverse(fetch_list.start);

  /* now fetch results for each msg */
  endptr = args[0];
--- 2047,2053 ----
      }
    }

!   fetch_list.start = dbmail_list_reverse(fetch_list.start);

  /* now fetch results for each msg */
  endptr = args[0];
diff -c -r dbmail-2.0rc3/list.c dbmail-2.0rc3-ed/list.c
*** dbmail-2.0rc3/list.c        2004-01-07 10:00:16.000000000 -0500
--- dbmail-2.0rc3-ed/list.c     2004-03-07 12:10:32.000000000 -0500
***************
*** 65,71 ****
 *
 * reverse the order of a linked list
 */
! struct element* list_reverse(struct element *start)
{
  struct element *newstart;

--- 65,71 ----
 *
 * reverse the order of a linked list
 */
! struct element* dbmail_list_reverse(struct element *start)
{
  struct element *newstart;

***************
*** 75,81 ****
  if (!start->nextnode)
    return start; /* nothing to reverse */

!   newstart = list_reverse(start->nextnode); /* reverse rest of list */
  start->nextnode->nextnode = start;

  start->nextnode = NULL; /* terminate list */
--- 75,81 ----
  if (!start->nextnode)
    return start; /* nothing to reverse */

!   newstart = dbmail_list_reverse(start->nextnode); /* reverse rest of

list */


  start->nextnode->nextnode = start;

  start->nextnode = NULL; /* terminate list */
diff -c -r dbmail-2.0rc3/list.h dbmail-2.0rc3-ed/list.h
*** dbmail-2.0rc3/list.h        2004-01-07 10:00:16.000000000 -0500
--- dbmail-2.0rc3-ed/list.h     2004-03-07 12:09:18.000000000 -0500
***************
*** 59,64 ****
long list_totalnodes(struct list *tlist);
void list_showlist(struct list *tlist);
void list_init(struct list *tlist);
! struct element* list_reverse(struct element *start);

#endif
--- 59,64 ----
long list_totalnodes(struct list *tlist);
void list_showlist(struct list *tlist);
void list_init(struct list *tlist);
! struct element* dbmail_list_reverse(struct element *start);

#endif
diff -c -r dbmail-2.0rc3/lmtp.c dbmail-2.0rc3-ed/lmtp.c
*** dbmail-2.0rc3/lmtp.c        2004-03-05 03:10:12.000000000 -0500
--- dbmail-2.0rc3-ed/lmtp.c     2004-03-07 12:09:29.000000000 -0500
***************
*** 532,538 ****
              struct element *element;

              /* The replies MUST be in the order received */
!               rcpt.start = list_reverse(rcpt.start);

              /* Resolve the addresses into deliverable / non-deliverable

form. */


              if (dsnuser_resolve_list(&rcpt) == -1)
--- 532,538 ----
              struct element *element;

              /* The replies MUST be in the order received */
!               rcpt.start = dbmail_list_reverse(rcpt.start);

              /* Resolve the addresses into deliverable / non-deliverable

form. */


              if (dsnuser_resolve_list(&rcpt) == -1)
diff -c -r dbmail-2.0rc3/rfcmsg.c dbmail-2.0rc3-ed/rfcmsg.c
*** dbmail-2.0rc3/rfcmsg.c      2004-01-07 10:00:16.000000000 -0500
--- dbmail-2.0rc3-ed/rfcmsg.c   2004-03-07 12:09:48.000000000 -0500
***************
*** 90,100 ****
    }

  /* reverse this list */
!   msg->children.start = list_reverse(msg->children.start);

  /* reverse header items */
!   msg->mimeheader.start = list_reverse(msg->mimeheader.start);
!   msg->rfcheader.start  = list_reverse(msg->rfcheader.start);
}

/*
--- 90,100 ----
    }

  /* reverse this list */
!   msg->children.start = dbmail_list_reverse(msg->children.start);

  /* reverse header items */
!   msg->mimeheader.start = dbmail_list_reverse(msg->mimeheader.start);
!   msg->rfcheader.start  = dbmail_list_reverse(msg->rfcheader.start);
}

/*


Security on the internet is impossible without strong, open,
and unhindered encryption.

_______________________________________________
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


Security on the internet is impossible without strong, open,
and unhindered encryption.

_______________________________________________
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





Reply via email to