X-Git-Url: http://git.maemo.org/git/?p=ipypbx;a=blobdiff_plain;f=src%2Fipypbx%2Fhttp.py;h=68b12340ce97d3488a03d9f27347d26954d9424e;hp=927eb9fc7627a9899a6557512f607eb7cd5c965a;hb=7584e0edd7d87cab241030dd61a7ab29e357a26d;hpb=45cd6585bc64d90cd1b34b69ed8b313cafadfe55 diff --git a/src/ipypbx/http.py b/src/ipypbx/http.py index 927eb9f..68b1234 100644 --- a/src/ipypbx/http.py +++ b/src/ipypbx/http.py @@ -31,7 +31,7 @@ class FreeswitchConfigServer(QtNetwork.QTcpServer): self.httpRequestParser = HttpRequestParser() - def setSocket(self, host, port): + def setSocketData(self, host, port): """ Set host and port for socket to listen on. """ @@ -63,17 +63,17 @@ class FreeswitchConfigServer(QtNetwork.QTcpServer): self.stopServer() self.startServer() - def clientConnecting(self, socket): + def clientConnecting(self): """ 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):