summaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorviega1998-06-13 21:57:19 +0000
committerviega1998-06-13 21:57:19 +0000
commit2f8ffdc4ad7698777e3afc14f146caab8aa4cb88 (patch)
treeee5bdf39a92ad6add99e0bfc20203a1266254259 /cgi
parent901fb95186006a6bb6bfcd66bafbdbff9ccb8097 (diff)
downloadmailman-2f8ffdc4ad7698777e3afc14f146caab8aa4cb88.tar.gz
mailman-2f8ffdc4ad7698777e3afc14f146caab8aa4cb88.tar.zst
mailman-2f8ffdc4ad7698777e3afc14f146caab8aa4cb88.zip
Add Unlock() calls where appropriate, and add lock = 0 to MailList
constructor actuals when the list doesn't need to be locked.
Diffstat (limited to 'cgi')
-rwxr-xr-xcgi/admin5
-rwxr-xr-xcgi/edithtml3
-rwxr-xr-xcgi/handle_opts4
-rwxr-xr-xcgi/listinfo5
-rwxr-xr-xcgi/options4
-rwxr-xr-xcgi/roster2
-rwxr-xr-xcgi/subscribe4
7 files changed, 18 insertions, 9 deletions
diff --git a/cgi/admin b/cgi/admin
index 2d918b865..706cdcea7 100755
--- a/cgi/admin
+++ b/cgi/admin
@@ -21,7 +21,7 @@
To run stand-alone for debugging, set env var PATH_INFO to name of list
and, optionally, options category."""
-__version__ = "$Revision: 696 $"
+__version__ = "$Revision: 732 $"
import sys
import os, cgi, string, crypt, types, time
@@ -230,8 +230,7 @@ def FormatAdminOverview(error=None):
names = mm_utils.list_names()
names.sort()
for n in names:
- l = maillist.MailList(n)
- l.Unlock()
+ l = maillist.MailList(n, lock=0)
if l.advertised: advertised.append(l)
if error:
diff --git a/cgi/edithtml b/cgi/edithtml
index f2c5264d0..509bf25a7 100755
--- a/cgi/edithtml
+++ b/cgi/edithtml
@@ -58,7 +58,7 @@ if len(list_info) < 1:
list_name = string.lower(list_info[0])
try:
- list = maillist.MailList(list_name)
+ list = maillist.MailList(list_name, lock=0)
except:
doc.AddItem(htmlformat.Header(2, "%s : No such list" % list_name))
print doc.Format()
@@ -173,4 +173,3 @@ finally:
print doc.Format()
except:
pass
- list.Unlock()
diff --git a/cgi/handle_opts b/cgi/handle_opts
index f8fcd1da1..45a98858c 100755
--- a/cgi/handle_opts
+++ b/cgi/handle_opts
@@ -62,6 +62,7 @@ if not list._ready:
doc.AddItem(htmlformat.Header(2, "Error"))
doc.AddItem(htmlformat.Bold("%s: No such list." % list_name))
print doc.Format(bgcolor="#ffffff")
+ list.Unlock()
sys.exit(0)
@@ -208,3 +209,6 @@ exactly what you did to get this error.<p>''' % (mm_cfg.MAILMAN_OWNER))
pass
list.SetUserOption(user, mm_cfg.ConcealSubscription, conceal)
PrintResults("You have successfully set your options.")
+
+
+list.Unlock() \ No newline at end of file
diff --git a/cgi/listinfo b/cgi/listinfo
index a51e77fb7..b32cfbfd1 100755
--- a/cgi/listinfo
+++ b/cgi/listinfo
@@ -50,7 +50,7 @@ def main():
list_name = string.lower(list_info[0])
try:
- list = maillist.MailList(list_name)
+ list = maillist.MailList(list_name, lock=0)
except:
list = None
@@ -83,8 +83,7 @@ def FormatListinfoOverview(error=None):
http_host = None
for n in names:
- l = maillist.MailList(n)
- l.Unlock()
+ l = maillist.MailList(n, lock = 0)
if l.advertised:
if (http_host
and (string.find(http_host, l.host_name) == -1
diff --git a/cgi/options b/cgi/options
index 2464e8ade..2dcf3d666 100755
--- a/cgi/options
+++ b/cgi/options
@@ -67,6 +67,7 @@ if not list._ready:
doc.AddItem(htmlformat.Header(2, "Error"))
doc.AddItem(htmlformat.Bold("%s: No such list." % list_name ))
print doc.Format()
+ list.Unlock()
sys.exit(0)
if string.lower(user) not in list.members + list.digest_members:
@@ -75,6 +76,7 @@ if string.lower(user) not in list.members + list.digest_members:
% (list_name, `user`)))
doc.AddItem(list.GetMailmanFooter())
print doc.Format()
+ list.Unlock()
sys.exit(0)
# Re-obscure the user's address for the page banner if obscure_addresses set.
@@ -129,3 +131,5 @@ replacements['<mm-email-my-pw>'] = list.FormatButton('emailpw',
doc.AddItem(list.ParseTags('options.html', replacements))
print doc.Format()
+
+list.Unlock() \ No newline at end of file
diff --git a/cgi/roster b/cgi/roster
index 6272e4268..65435e914 100755
--- a/cgi/roster
+++ b/cgi/roster
@@ -95,7 +95,7 @@ def get_list():
sys.exit(0)
list_name = string.lower(list_info[0])
try:
- list = maillist.MailList(list_name)
+ list = maillist.MailList(list_name, lock = 0)
except mm_err.MMUnknownListError:
error_page("%s: No such list.", list_name)
sys.exit(0)
diff --git a/cgi/subscribe b/cgi/subscribe
index df7076e3f..38c1601bf 100755
--- a/cgi/subscribe
+++ b/cgi/subscribe
@@ -55,6 +55,7 @@ if not list._ready:
doc.AddItem(htmlformat.Header(2, "Error"))
doc.AddItem(htmlformat.Bold("%s: No such list." % list_name ))
print doc.Format()
+ list.Unlock()
sys.exit(0)
form = cgi.FieldStorage()
@@ -81,6 +82,7 @@ if (form.has_key("UserOptions")
doc.AddItem(htmlformat.Bold("You must supply your email address."))
doc.AddItem(list.GetMailmanFooter())
print doc.Format()
+ list.Unlock()
sys.exit(0)
addr = form['info'].value
member = list.FindUser(addr)
@@ -90,6 +92,7 @@ if (form.has_key("UserOptions")
% (list.real_name, addr)))
doc.AddItem(list.GetMailmanFooter())
print doc.Format()
+ list.Unlock()
sys.exit(0)
call_script('options', [list._internal_name, member])
if not form.has_key("email"):
@@ -189,3 +192,4 @@ else:
PrintResults()
+list.Unlock() \ No newline at end of file