[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Work on making a server start.
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv32354/lib/mixminion
Modified Files:
ClientMain.py Common.py Main.py ServerInfo.py test.py
Log Message:
Work on making a server start.
Index: ClientMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientMain.py,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- ClientMain.py 28 May 2003 06:37:32 -0000 1.78
+++ ClientMain.py 28 May 2003 07:36:24 -0000 1.79
@@ -44,8 +44,10 @@
MBOX_TYPE, SMTP_TYPE, DROP_TYPE
# FFFF This should be made configurable and adjustable.
-MIXMINION_DIRECTORY_URL = "http://mixminion.net/directory/Directory.gz"
-MIXMINION_DIRECTORY_FINGERPRINT = "CD80DD1B8BE7CA2E13C928D57499992D56579CCD"
+MIXMINION_DIRECTORY_URL = "http://mixminion.net/directory/Directory_TEST.gz"
+#MIXMINION_DIRECTORY_FINGERPRINT = "CD80DD1B8BE7CA2E13C928D57499992D56579CCD"
+# XXXX004 This change is temporary
+MIXMINION_DIRECTORY_FINGERPRINT = "67BE06E7C2ADCCE3F389675F8796EAF681B9875F"
#----------------------------------------------------------------------
# Global variable; holds an instance of Common.Lockfile used to prevent
@@ -603,17 +605,7 @@
nNeeded = len([info for info in servers if info is None])
relays = self.__find(self.byCapability['relay'], startAt, endAt)
unusedRelays = setSub(relays, used)
- ALLOW_REUSE = 0
- if ALLOW_REUSE and nNeeded <= len(unusedRelays):
- # We can choose without replacement.
- #XXXX004 this code needs to be chopped out.
- newServers = prng.shuffle(unusedRelays, nNeeded)
- j = 0
- for i in xrange(len(servers)):
- if servers[i] is None:
- servers[i] = newServers[j]
- j += 1
- elif relays:
+ if relays:
# We know at least one relay, but not enough to choose without
# replacement. First, give an appropriate warning...
@@ -1193,7 +1185,7 @@
# the latest midnight preceeding the time when this
# packet was inserted into the queue
# )
- # XXXX004 change this to be OO; add nicknames.
+ # XXXX change this to be OO; add nicknames.
# XXXX004 write unit tests
Index: Common.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Common.py,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- Common.py 28 May 2003 06:37:32 -0000 1.80
+++ Common.py 28 May 2003 07:36:24 -0000 1.81
@@ -398,6 +398,7 @@
def readFile(fn, binary=0):
"""DOCDOC"""
+ #XXXX004 use more.
f = open(fn, ['r', 'rb'][binary])
try:
return f.read()
@@ -405,6 +406,8 @@
f.close()
def writeFile(fn, contents, mode=0600, binary=0):
+ """DOCDOC"""
+ #XXXX004 use more.
tmpname = fn+".tmp"
f, tmpname = openUnique(tmpname, ['w','wb'][binary], mode)
try:
Index: Main.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Main.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- Main.py 26 May 2003 21:08:13 -0000 1.42
+++ Main.py 28 May 2003 07:36:24 -0000 1.43
@@ -139,6 +139,7 @@
"server-stop" : ( 'mixminion.server.ServerMain', 'signalServer' ),
"server-reload" : ( 'mixminion.server.ServerMain', 'signalServer' ),
"server-republish":( 'mixminion.server.ServerMain', 'runRepublish'),
+ "server-upgrade": ( 'mixminion.server.ServerMain', 'runUpgrade'),
"server-stats" : ( 'mixminion.server.ServerMain', 'printServerStats' ),
"dir": ( 'mixminion.directory.DirMain', 'main'),
}
@@ -167,6 +168,7 @@
" server-keygen [Generate keys for a Mixminion server]\n"+
" server-DELKEYS [Remove generated keys for a Mixminion server]\n"+
" server-stats [XXXX]\n"+
+ " {XXXX004 stuff has changed!\n"+
" (For Developers)\n"+
" dir [Administration for server directories]\n"+
" unittests [Run the mixminion unit tests]\n"+
@@ -206,7 +208,7 @@
if args[1] not in ('unittests', 'benchmarks'):
print "==========================================================="
print " TURN BACK NOW !!!"
- print "This version of Mixminion (0.0.4alpha2) is compatible with no"
+ print "This version of Mixminion (0.0.4alpha3) is compatible with no"
print "other version. Go check out the maintenance branch if you"
print "want to use this software to run a server or send messages."
print "==========================================================="
Index: ServerInfo.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ServerInfo.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- ServerInfo.py 23 May 2003 07:54:11 -0000 1.42
+++ ServerInfo.py 28 May 2003 07:36:24 -0000 1.43
@@ -114,7 +114,7 @@
if name == 'Server':
for k,v,_ in ents:
if k == 'Descriptor-Version' and v.strip() != '0.2':
- raise ConfigError("Unrecognized descriptor version %s"
+ raise ConfigError("Unrecognized descriptor version: %s"
% v.strip())
#XXXX Remove sections with unrecognized versions.
Index: test.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/test.py,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- test.py 27 May 2003 17:24:49 -0000 1.109
+++ test.py 28 May 2003 07:36:24 -0000 1.110
@@ -4894,8 +4894,8 @@
if USE_SLOW_MODE:
# These are slow, since they regenerate the DH params.
# Test getDHFile
- f = keyring.getDHFile()
- f2 = keyring.getDHFile()
+ f = keyring._getDHFile()
+ f2 = keyring._getDHFile()
self.assertEquals(f, f2)
# Test getTLSContext