[Nym3-commit] r30 - trunk

nym3-devel@lists.noreply.org nym3-devel@lists.noreply.org
Sat, 10 Jul 2004 17:15:03 +0200


Author: laurent
Date: 2004-07-10 17:15:01 +0200 (Sat, 10 Jul 2004)
New Revision: 30

Modified:
   trunk/message.ml
   trunk/user.ml
Log:
Change the userdata to take care of the challenge.


Modified: trunk/message.ml
===================================================================
--- trunk/message.ml	2004-07-01 20:10:34 UTC (rev 29)
+++ trunk/message.ml	2004-07-10 15:15:01 UTC (rev 30)
@@ -40,7 +40,9 @@
 
 type command2client =
     Created of string * string 
-  | Status of int * int * int * int * string list (* do we use native int for 4 bytes length? *)
+  | Status of int * int * int * int * string list 
+  (* do we use native int for 4 bytes length? 
+  laurent: no we shouldn't, ocaml's int are shorter by one bit anyway *)
   | Summary of int * string
   | Msg of string * string
   | Dropped of string list

Modified: trunk/user.ml
===================================================================
--- trunk/user.ml	2004-07-01 20:10:34 UTC (rev 29)
+++ trunk/user.ml	2004-07-10 15:15:01 UTC (rev 30)
@@ -12,13 +12,16 @@
 
 type hold = Never | Quota | Always;;
 
+type status = Reserved of string | Created;;
+
 (* This follows section 2.1, "Information associated with each nym" of
-   the nym-specs. *)
+   the nym-specs. status may hold a challenge. *)
 type userdata = { idkey : string; cipherkey: string; policy : policy;
 				  email_latency : int; syn_latency : int;
 				  surb_rate : int; max_clear_syn : int;
 				  hold_policy : hold; shutdown : string;
-				  max_queued : int; max_size : int; max_space : int };;
+				  max_queued : int; max_size : int; max_space : int;
+				  status : status; };;
 
 let open_userdb path =
 	Dbm.opendbm path [Dbm.Dbm_rdwr; Dbm.Dbm_create] (6 * 64 + 4 * 8);;