Re: [evolution-patches] Patch for 52378: all new mail marked as spam



On Sun, 2004-01-04 at 20:49 -0500, Frank Solensky wrote:
On Sun, 2004-01-04 at 19:12, Not Zed wrote:
> looks reasonable at first glance,  but please submit following the
> guidelines in the HACKING file.  Particularly, it must include a
> ChangeLog and should be in unified diff format.

Ah; sorry; here it is again..

Excellent, thanks.

~~~~~~~~~~~~~~~~~~~~
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2964
diff -u -p -r1.2964 ChangeLog
--- ChangeLog   22 Dec 2003 14:50:56 -0000      1.2964
+++ ChangeLog   5 Jan 2004 01:46:36 -0000
@@ -1,3 +1,11 @@
+2004-01-04  Frank Solensky  <frank solensky org>
+
+       * em-junk-filter.c (em_junk_sa_test_spamd_running),
+       (em_junk_sa_test_spamd), (em_junk_sa_check_junk),
+       (em_junk_sa_report_junk), (em_junk_sa_report_notjunk),
+       (em_junk_sa_commit_reports): Fixes #52378: vector passed to
+       execvp() must be NULL-terminated.
+
 2003-12-22  David Moore  <davmre bellsouth net>
    
        * em-popup.c (emp_part_popup_set_background): Implemented; sets an
Index: em-junk-filter.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-junk-filter.c,v
retrieving revision 1.4
diff -u -p -r1.4 em-junk-filter.c
--- em-junk-filter.c    13 Nov 2003 11:33:26 -0000      1.4
+++ em-junk-filter.c    5 Jan 2004 01:46:36 -0000
@@ -166,9 +166,10 @@ pipe_to_sa (CamelMimeMessage *msg, gchar
 static int
 em_junk_sa_test_spamd_running (gint port)
 {
-       static gchar *sac_args [3] = {
+       static gchar *sac_args [4] = {
                "/bin/sh",
                "-c",
+               NULL,
                NULL
        };
        int retval;
@@ -176,7 +177,7 @@ em_junk_sa_test_spamd_running (gint port
        d(fprintf (stderr, "test if spamd is running (port %d)\n", port);)
        sac_args [2] = port > 0  ? g_strdup_printf ("spamc -x -p %d", port) : g_strdup_printf ("spamc -x");
  
-       retval = pipe_to_sa (NULL, "From test 127 0 0 1", 3, sac_args) == 0;
+       retval = pipe_to_sa (NULL, "From test 127.0.0.1", 1, sac_args)

Shouldn't this remain 3?

Otherwise i guess the patch is ok.  To be honest, pipe_to_sa seems a pretty odd api, it is only ever passed 1 thing that changes, and passing in "/bin/sh" "-c" every time, seems redundant, maybe the whole argc/argv thing can be removed, and just pass in the command to run as a simple string.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]