Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Qt3 code from libmythupnp #1056

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

Conversation

ulmus-scott
Copy link
Contributor

Use the replacements added in Qt4: QTcpSocket and QUdpSocket.

The receipt of ssdp:discover replies was briefly broken during the conversion.

SSDP is no longer its own thread, revealing that PortChecker blocks for an unnecessarily long time, which made the fade in animation on startup of mythfrontend very slow.

Checklist

replacing BufferedSocketDevice and removing the now unused Qt3 internal MMembuf.

~QTcpSocket() closes the connection if necessary, so I saw no reason to
close it before then.
This has not locked for the address list since 2008 with
0a3cbf5.

The only change is that UPnpNotifyTask::m_eNTS may now change, which is only
read to determine if the datagram should be sent twice.
It has been unused since 85bb976 in 2007.

No packets should be received from the broadcast address 255.255.255.255 (they
should have the sender's IP address), so there is never any data to read from
that socket in SSDP::run().
This temporarily breaks receipt of ssdp:discover replies since nothing
is listening on the search port they will be sent back to.
…cket

The replies will now be sent to a random port without a listener, which will
be remedied later.
creating SSDPReceiver.  Qt moc annoyingly errors on nested classes.

SSDP is no longer an MThread, but is still a singleton.
The replies will be sent to the source port, so we need to send
from the same port we are listening on.  I couldn't get this to work
with the old Qt3 code with only listening on one port.
On my LAN, almost all connected in under 1 ms.

Unfortunately, this appears to only loop in the main CoreContext/UI
thread.
to ensure the replies are sent to the listening socket address and port.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant