]> code.delx.au - pymsnt/commitdiff
Fixed default ft limit.
authorjamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>
Sat, 4 Feb 2006 14:58:46 +0000 (14:58 +0000)
committerjamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>
Sat, 4 Feb 2006 14:58:46 +0000 (14:58 +0000)
git-svn-id: http://delx.cjb.net/svn/pymsnt/trunk@114 55fbd22a-6204-0410-b2f0-b6c764c7e90a

committer: jamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>

config-example.xml
src/ft.py

index e8092696483cb16469f98537ddd11d7dbf8b77d7..43cd05c612f9157411dd5a445579441c5b243bd8 100644 (file)
@@ -4,8 +4,8 @@
 
 <!-- The JabberID of the transport -->
 <jid>msn</jid>
-<!-- The public IP of the machine the transport is running on -->
-<ip>127.0.0.1</ip>
+<!-- The public IP or DNS name of the machine the transport is running on -->
+<host>127.0.0.1</host>
 <!-- The component JID of the transport. Unless you're doing clustering, leave this alone -->
 <!-- <compjid>msn1</compjid> -->
 
@@ -51,6 +51,8 @@ Do not include the jid of the transport -->
 
 
 <!-- File transfer settings -->
+<!-- The maximum size of a file transfer (in bytes). For unlimited, comment out, or set to 0 -->
+<ftSizeLimit>524288</ftSizeLimit>
 <!-- Please give the port to listen for Jabber socks5 transfers on. -->
 <ftJabberPort>8010</ftJabberPort>
 <!-- Please give the port to listen for HTTP GETs here (Used in OOB file transfers). -->
index d47a9cd4347bea175f16f995deee2ba0144c80ec..f1984281775258a830bb3923b6304f5bb5ab2e14 100644 (file)
--- a/src/ft.py
+++ b/src/ft.py
@@ -15,13 +15,13 @@ import sys
 
 
 def checkSizeOk(size):
-       if not config.ftSizeLimit:
-               return True # No limit
        try:
                size = int(size)
                limit = int(config.ftSizeLimit)
        except ValueError:
                return False
+       if limit == 0:
+               return True
        return limit > size
 
 ###########