chiark / gitweb /
fixes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 1 Apr 2017 11:40:59 +0000 (12:40 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 1 Apr 2017 11:40:59 +0000 (12:40 +0100)
client
hippotat/__init__.py
server

diff --git a/client b/client
index 931cb1f..ce5e856 100755 (executable)
--- a/client
+++ b/client
@@ -48,7 +48,7 @@ outstanding = 0
 def start_client():
   global queue
   global agent
-  queue = PacketQueue(c.max_queue_time)
+  queue = PacketQueue('up', c.max_queue_time)
   agent = twisted.web.client.Agent(reactor, connectTimeout = c.http_timeout)
 
 def outbound(packet, saddr, daddr):
@@ -112,7 +112,7 @@ def check_outbound():
             mime_translate(d)                           + crlf +
             b'--b--'                                    + crlf)
 
-    print('REQUESTING ', mime, file=sys.stderr)
+    log_debug(DBG.HTTP_FULL, 'requesting: ' + str(mime))
 
     hh = { 'User-Agent': ['hippotat'],
            'Content-Type': ['multipart/form-data; boundary="b"'] }
index 0649091..22c92dc 100644 (file)
@@ -37,6 +37,7 @@ class DBG(twisted.python.constants.Names):
   INIT = NamedConstant()
   QUEUE = NamedConstant()
   QUEUE_CTRL = NamedConstant()
+  HTTP_FULL = NamedConstant()
 
 _hex_codec = codecs.getencoder('hex_codec')
 
diff --git a/server b/server
index 19a04d2..029d064 100755 (executable)
--- a/server
+++ b/server
@@ -168,6 +168,9 @@ def log_http(desca, msg):
 class IphttpResource(twisted.web.resource.Resource):
   isLeaf = True
   def render_POST(self, request):
+    log_debug(DBG.HTTP_FULL,
+              'req recv: ' + repr(request) + ' ' + repr(request.args),
+              idof=id(request))
     desca = {'d': None}
     try: process_request(request, desca)
     except Exception as e: