Ticket #8094 (assigned Patch - Feature)
Opened 3 years ago
Last modified 8 months ago
Adjust UPnP detection to search localhost
| Reported by: | wagnerrp | Owned by: | wagnerrp |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.27 |
| Component: | MythTV - UPnP | Version: | Master Head |
| Severity: | low | Keywords: | |
| Cc: | Ticket locked: | no |
Description
UPnP backend autodetection only works for systems given a routable address. This set of patches tries to connect the local status server on its default port (http://127.0.0.1:6544/Myth/GetConnectionInfo) before proceeding with the normal msearch, allowing detection of backends not using UPnP.
This change is needed for MythBuntu? to move away from a shared mysql.txt to the new config.xml in individual user directories.
Attachments
Change History
Changed 3 years ago by superm1@…
- Attachment 35_try_localhost_first added
implementation in mythcontext
comment:1 Changed 3 years ago by superm1@…
Just so these aren't lost (at least for the C++ implementation):
superm1> danielk22, could you comment whether http://svn.mythtv.org/trac/ticket/8094 looks too crackful at all during freeze - or if its at least the right direction to be headed? <danielk22> superm1: I think it's to late for that one. As for the patch itself my first concern would be that it might connect to a local master backend when you really want to the popup to choose which master to connect to. <superm1> danielk22, okay thanks. that's what i was figuring, it's just something wagnerrp me and rhpot1991 whipped together. <superm1> that's a situation i certainly didn't think about <superm1> albeit probably uncommon for anyone but a developer <danielk22> I'm not terribly fond of using something as heavyweight as UPnP for detecting backends, but it does mostly work. <superm1> do you think adding a --disable-local switch to the misc binaries using mythcontext like that would be sufficient then to prevent such a type of problem? <danielk22> superm1: Sure, but it's always good to try to address these things from the start, so hacks don't get applied on top of hacks later on. If it isn't tractable, then a switch would be fine. Maybe just a popup that ask "A local master backend was found, do you want to search for remote ones as well?" <superm1> that's a good point. i'll see about making such a popup instead then, sounds like a better solution to avoid hack upon hack being added
comment:3 Changed 3 years ago by beirdo
- Owner changed from dblain to stuartm
Also related to the mysql.txt/config.xml merge. I'd be happy to work the UPnP side of this if we chose to do this, but meanwhile, I'm just keeping the related tickets together.
comment:4 Changed 2 years ago by stuartm
- Status changed from assigned to accepted
- Version changed from head to Trunk Head
- Type changed from enhancement to Patch - Feature
- Milestone changed from unknown to 0.25
comment:5 Changed 2 years ago by stuartm
These patches need updating and I think moved to more common code. The backend selection screen fails to find a local backend if the machine is firewalled because the SSDP search uses multicast, so building the local check into the upnp discovery code instead of mythcontext will be more useful.
comment:6 Changed 15 months ago by stuartm
- Status changed from accepted to infoneeded
- Milestone changed from 0.25 to unknown
comment:7 Changed 15 months ago by stuartm
- Status changed from infoneeded to assigned
- Milestone changed from unknown to 0.25
I will consider Mario's patch to try localhost first for the service discovery for 0.25, I'm not able to comment on the python and perl patches.
comment:8 Changed 15 months ago by stuartm
- Milestone changed from 0.25 to 0.26
Patch doesn't work for 0.25 and I think there's a better implementation possible if we wait for 0.26 anyway.
comment:9 Changed 8 months ago by Rune Petersen <rune@…>
It is unclear what the plan is... But if you want to use unicast UPNP M-SEARCH you should know:
- It is not possible to receive unicast on port 1900 on windows (windows has a ssdp service, and SO_REUSEADDR with unicast is broken on windows)
- It is possible to use an alternative port for receiving unicast UPNP M-SEARCH (the SEARCHPORT.UPNP.ORG header)
If you simply need libmythupnp to also send M-SEARCH to localhost:1900 I don't mind making a patch for this.
