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

MythTV 0.27 Change to Bonjour service type name #158

Closed
billmeek opened this issue Aug 29, 2013 · 7 comments
Closed

MythTV 0.27 Change to Bonjour service type name #158

billmeek opened this issue Aug 29, 2013 · 7 comments
Assignees
Milestone

Comments

@billmeek
Copy link
Contributor

Marking this issue as a design discussion, for now. When the commit is released,
change this to a bug.

8/28/2013, Trac ticket: http://code.mythtv.org/trac/ticket/10773 has been discussed
on the commits list and the plan is to change the 'service type name' from
mythbacked-master or mythbackend-slave to just mythbackend.

The master/slave portion will now be placed in the txt section.

I believe this will break the zeroconf detaction of the backend. No changes
are proposed for the frontend service type.

src/org/mythtv/client/ui/preferences/MythtvPreferenceActivity.java
private static final String MYTHTV_MASTER_BACKEND_TYPE = "_mythbackend-master._tcp.local.";
@ghost ghost assigned dmfrey Aug 29, 2013
@billmeek
Copy link
Contributor Author

MythTV 0.27 commit was done 8/29/2013.

See: code.mythtv.org/cgit/mythtv/commit/?id=d538503

As expected, the backend is no longer found on the network.

New: name 'Mythbackend on mc1' type '_mythbackend._tcp.' domain: 'local.'
Old: name 'Mythbackend on mc0' type '_mythbackend-master._tcp.' domain: 'local.'

Moved this issue from a 'design discussion' to a 'bug' and 'critical'.

@dmfrey
Copy link
Contributor

dmfrey commented Aug 30, 2013

@billmeek can you capture what it looks like on you backend in a zeroconf browser? Just so I can determine where the text is going to be that indicates master or slave

@dmfrey
Copy link
Contributor

dmfrey commented Aug 30, 2013

Also, what about frontend discovery? Any changes there?

@billmeek
Copy link
Contributor Author

I tried with the ZeroConf Browser on my tablet and it doesn't
display the txt record.

From Linux, using avahi-discover, the following can be seen on the terminal
window (it's much easier to read on the GUI.)

Service data for service 'Mythbackend on mc1'
of type '_mythbackend._tcp' in domain 'local' on 2.0:
Host mc1.local (192.168.1.223),
port 6544,
TXT data: ['master']

I've not been able to find an example of something like getTxt() to use.

In order to have my tablet work, I had to make the following change
in client/ui/preferences/MythtvPreferenceActivity.java:

-   private static final String MYTHTV_MASTER_BACKEND_TYPE = "_mythbackend-master._tcp.local.";
+   private static final String MYTHTV_MASTER_BACKEND_TYPE = "_mythbackend._tcp.local.";

Of course, this means that both master and slave look the same and I just need to
remember which mode my test box is being run in and cancel the discovery when
I'm testing with it as a slave.

@billmeek
Copy link
Contributor Author

The name for the frontend fits into the 15 character limit that they're
fixing with this commit. So, no change.

@dmfrey dmfrey closed this as completed in d15da42 Aug 30, 2013
@billmeek
Copy link
Contributor Author

Previously, when I ran with my master (mc0) and a slave (slave-mc1) and
configured MAF, only mc0 would be presented. With this fix, both are.

Shouldn't the host that's marked as slave in the newly used txt record be
hidden from the user?

@billmeek billmeek reopened this Aug 30, 2013
@billmeek
Copy link
Contributor Author

The following works, ONLY if I change the backend to send role=master or role=slave
(role could be any other word.)

If the BE only returns master or slave in the txt record (which is supposed to be legal,) then
I can't get this to work:

Enumeration<String> txtRecords = info.getPropertyNames();
if(txtRecords.hasMoreElements()) {
    Log.v( TAG, "TXT Records=" + txtRecords.nextElement().toString() )
}

This also fails if there is no = in the txt record.

Log.v( TAG, "Testing for a master txt record = " + info.getPropertyString( "master" ) );

The result of the above is null for both master and slave roles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants