projects
/
ipypbx
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Config server fixes
[ipypbx]
/
src
/
ipypbx
/
http.py
diff --git
a/src/ipypbx/http.py
b/src/ipypbx/http.py
index
927eb9f
..
68b1234
100644
(file)
--- a/
src/ipypbx/http.py
+++ b/
src/ipypbx/http.py
@@
-31,7
+31,7
@@
class FreeswitchConfigServer(QtNetwork.QTcpServer):
self.httpRequestParser = HttpRequestParser()
self.httpRequestParser = HttpRequestParser()
- def setSocket(self, host, port):
+ def setSocketData(self, host, port):
"""
Set host and port for socket to listen on.
"""
"""
Set host and port for socket to listen on.
"""
@@
-63,17
+63,17
@@
class FreeswitchConfigServer(QtNetwork.QTcpServer):
self.stopServer()
self.startServer()
self.stopServer()
self.startServer()
- def clientConnecting(self, socket):
+ def clientConnecting(self):
"""
Handle client connection.
"""
if self.hasPendingConnections():
"""
Handle client connection.
"""
if self.hasPendingConnections():
- connectingClient = self.server.nextPendingConnection()
- connectingClient.readyRead.connect(self.receiveData)
+ self.socket = self.nextPendingConnection()
+ self.socket.readyRead.connect(self.receiveData)
- def receiveData(self, socket):
- while socket.canReadLine():
- line = socket.readLine().strip()
+ def receiveData(self):
+ while self.socket.canReadLine():
+ line = str(self.socket.readLine()).strip()
class HttpParseError(Exception):
class HttpParseError(Exception):