jbagg / QtZeroConf

Qt wrapper class for ZeroConf libraries across various platforms.
Other
70 stars 51 forks source link

the host is empty #11

Closed 0x000000FF closed 7 years ago

0x000000FF commented 7 years ago

I test the browser,I found that the host string is empty(""),but my service truly published with the host string,I can get it by my python code.I need this string ,is there a way to solve this?Thanks!

0x000000FF commented 7 years ago

in file bonjour.cpp,line 194,after if (hAddress.protocol() == QAbstractSocket::IPv6Protocol) ref->newService->ipv6 = hAddress; else ref->newService->ip = hAddress; I insert this line ref->newService->host = hostName;

and it shows hostname. thanks

jbagg commented 7 years ago

Yes, it looks like hostname was missing ios/macos/windows. Do you want to make a pull request for me?

jbagg commented 7 years ago

...the Q_UNUSED(hostName); line 180 should be removed as well.

jbagg commented 7 years ago

...and please use TABs only.

I'm wondering if ref->newService->host = hostName; (maybe on line 155 ;) belongs in QZeroConfPrivate::resolverCallback() as hostName is just working its way to addressReply()