pipacs/o2 — pull request #16 by mandeepsandhu (2013-07-25 08:36:50+00:00)
Title: O2 bug fixes

Correct handling of multiple incoming connections in O2ReplyServer

O2ReplyServer:
* We are using a single variable to store the client socket
pointer. In case we get multiple incoming connections, we end
up overwriting the socket pointers. Subsequently when we get
the readyRead() signal we don't have a way of getting the
pointer.

Fix is to not store the client socket in a member variable.
The pointer in O2ReplyServer::onBytesReady() is got using the
sender() function. This way we can read data from the correct
socket even when handling multiple incoming connections.

* We were also leaking memory of the client socket as we were
not deleting the object once we're done.

Fixed it by connecting the socket's disconnected() signal to
its deleteLater() slot.

O2:
* There was a bug where O2 was not emitting the linkingSucceeded()
signal if the application was already linked.

Fixed this issue by emitting the signal.