From 165118829a99be74d59ffd40d4c68ae64eab5a91 Mon Sep 17 00:00:00 2001 From: "M. Ian Graham" Date: Fri, 8 Aug 2008 01:14:17 +0000 Subject: [PATCH] Added setConnectionURL for access from otp_server web interface --- direct/src/http/webAIInspector.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/direct/src/http/webAIInspector.py b/direct/src/http/webAIInspector.py index d288d15874..4be110e658 100755 --- a/direct/src/http/webAIInspector.py +++ b/direct/src/http/webAIInspector.py @@ -6,7 +6,7 @@ The port will need to be defined when the instance is inited. """ -import string, time, direct, inspect +import string, time, direct, inspect, socket from operator import itemgetter from direct.http import WebRequest from socket import gethostname @@ -42,6 +42,8 @@ class aiWebServer(SystemInformation): self.web.registerGETHandler('magicWord', self.magicWord) self.startCheckingIncomingHTTP() + self.air.setConnectionURL("http://%s:%s/" % (socket.gethostbyname(socket.gethostname()),self.HTTPListenPort)) + def magicWord(self, replyTo, **kw): # This will process Magic Word requests # Currently the following words are supported: