Author: dmeyer
Date: Mon Oct 24 18:21:58 2005
New Revision: 7751
Added:
trunk/ui/src/www/fsocket.py
- copied unchanged from r7746, /trunk/ui/src/util/fsocket.py
Modified:
trunk/ui/src/www/conf.py
trunk/ui/src/www/server.py
Log:
more webserver cleanup
Modified: trunk/ui/src/www/conf.py
==============================================================================
--- trunk/ui/src/www/conf.py (original)
+++ trunk/ui/src/www/conf.py Mon Oct 24 18:21:58 2005
@@ -9,3 +9,5 @@
STYLESHEET = config.WWW_STYLESHEET
JAVASCRIPT = config.WWW_JAVASCRIPT
ENCODING = config.encoding
+USERS = config.WWW_USERS
+PORT = config.WWW_PORT
Modified: trunk/ui/src/www/server.py
==============================================================================
--- trunk/ui/src/www/server.py (original)
+++ trunk/ui/src/www/server.py Mon Oct 24 18:21:58 2005
@@ -1,6 +1,6 @@
# -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------------
-# server.py - a simple webserver for use with pyNotifier
+# server.py - a simple webserver for use with kaa.notifier
# -----------------------------------------------------------------------------
# $Id$
#
@@ -36,6 +36,7 @@
__all__ = [ 'RequestHandler', 'Server' ]
+# python imports
import socket
import SimpleHTTPServer
import base64
@@ -46,9 +47,12 @@
import traceback
import logging
-import config
-import notifier
-import util.fsocket as fsocket
+# kaa imports
+import kaa.notifier
+
+# freevo-webserver imports
+import conf
+import fsocket
# get logging object
@@ -239,7 +243,7 @@
if not auth: return False
(username, password) = auth.split(':', 1)
- cryptedpassword = config.WWW_USERS.get(username)
+ cryptedpassword = conf.USERS.get(username)
if cryptedpassword:
return crypt.crypt(password, cryptedpassword[:2]) ==
cryptedpassword
@@ -276,8 +280,7 @@
self.socket.bind((ip, port))
self.socket.listen(5)
- notifier.addSocket( self.socket, self.accept )
- config.detect('channels')
+ kaa.notifier.SocketDisatcher(self.accept).register(self.socket)
def accept (self, socket):
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog