sks-devel
[Top][All Lists]
Advanced

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

Re: [Sks-devel] Patches imported


From: Phil Pennock
Subject: Re: [Sks-devel] Patches imported
Date: Wed, 25 Mar 2009 20:28:45 -0700

On 2009-03-25 at 22:20 -0400, Yaron Minsky wrote:
> I imported the proposed patches into the hg repo, with some minor changes.
> People should try it out, and if the reports are good, I'll bless it as the
> next release.
> 
> The repo can be found here:
> 
>    http://hg.minskyprimus.net/sks/trunk

The attached is deliberately as small as possible.

 (1) don't complain of malformed lines for lines which are just comments

 (2) fix the mailsync reload to compare the mtime to the cached mailsync
     mtime instead of the membership's mtime

 (3) Sort out ADDR_INET display in the other relevant places too (I
     didn't move the two remaining sockaddr_to_string instances to common
     as I did originally, but still think that's better than defining it
     in two places; but this way the change is more obviously
     correct-by-brief-inspection)

 (4) sks.pod example fixes:
     (a) don't set logfile, since this is deprecated (now ignored?)
     (b) set initial_stat; an example of how to set a boolean in a way
         which doesn't litter !Settings.anonlist
     (c) use example.com instead of the domain of a hosting company (as
         example.com is reserved for use in documentation examples)

Regards,
-Phil
diff --git a/dbMessages.ml b/dbMessages.ml
--- a/dbMessages.ml
+++ b/dbMessages.ml
@@ -164,7 +164,7 @@ let rec unmarshal_msg cin =
 
 let sockaddr_to_string sockaddr = match sockaddr with
     Unix.ADDR_UNIX s -> sprintf "<ADDR_UNIX %s>" s
-  | Unix.ADDR_INET (addr,p) -> sprintf "<ADDR_INET %s:%d>" 
(Unix.string_of_inet_addr addr) p
+  | Unix.ADDR_INET (addr,p) -> sprintf "<ADDR_INET [%s]:%d>" 
(Unix.string_of_inet_addr addr) p
 
 let msg_to_string msg = 
   match msg with
diff --git a/membership.ml b/membership.ml
--- a/membership.ml
+++ b/membership.ml
@@ -29,6 +29,7 @@ open Common
 exception Bug of string
 exception Lookup_failure of string
 exception Malformed_entry of string
+exception Empty_line
 
 let membership = ref ([| |],-1.)
 
@@ -48,6 +49,7 @@ let remove_self addresses =
 
 let convert_address l =
   try 
+    if String.length l = 0 then raise Empty_line else
     sscanf l "%s %s"
       (fun addr service ->
          if addr = "" || service = "" then failwith "Blank line";
@@ -63,6 +65,7 @@ let load_membership_file file =
       if addr = [] then raise (Lookup_failure line);
       (addr,line) :: loop list
     with
+      | Empty_line -> loop list
       | End_of_file -> list
       | Lookup_failure addr -> 
          perror "Lookup failure on address %s" addr;
@@ -202,7 +205,7 @@ let load_mailsync_partners fname =
 
 let reload_mailsync_if_changed () = 
   let fname = Lazy.force Settings.mailsync_file in
-  let (mshp,old_mtime) = !membership in
+  let (msync,old_mtime) = !mailsync_partners in
   match get_mtime fname with
       None -> plerror 2 "%s" 
        ("Failed to find mtime, can't decide whether to" ^
diff --git a/reconMessages.ml b/reconMessages.ml
--- a/reconMessages.ml
+++ b/reconMessages.ml
@@ -131,7 +131,7 @@ let unmarshal_configdata cin =
 
 let sockaddr_to_string sockaddr = match sockaddr with
     Unix.ADDR_UNIX s -> sprintf "<ADDR_UNIX %s>" s
-  | Unix.ADDR_INET (addr,p) -> sprintf "<ADDR_INET %s:%d>" 
+  | Unix.ADDR_INET (addr,p) -> sprintf "<ADDR_INET [%s]:%d>" 
       (Unix.string_of_inet_addr addr) p
 
 
diff --git a/sks.pod b/sks.pod
--- a/sks.pod
+++ b/sks.pod
@@ -327,10 +327,10 @@ The configuration file for your SKS serv
 
 =item sksconf
 
- logfile: log
  membership_reload_interval: 1
- hostname: keyserver.yourhost.com
- from_addr: address@hidden
+ initial_stat:
+ hostname: keyserver.example.com
+ from_addr: address@hidden
 
 =item Procmail
 

Attachment: pgp_eIzJXcSDu.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]