Advertisement
Guest User

Untitled

a guest
Apr 25th, 2012
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. diff --git a/mythtv/libs/libmythbase/bonjourregister.cpp b/mythtv/libs/libmythbase/bonjourregister.cpp
  2. index 017ee6d..8922811 100644
  3. --- a/mythtv/libs/libmythbase/bonjourregister.cpp
  4. +++ b/mythtv/libs/libmythbase/bonjourregister.cpp
  5. @@ -5,6 +5,7 @@
  6.  
  7. #include "mythlogging.h"
  8. #include "bonjourregister.h"
  9. +#include "mythcorecontext.h"
  10.  
  11. #define LOC QString("Bonjour: ")
  12.  
  13. @@ -41,11 +42,14 @@ bool BonjourRegister::Register(uint16_t port, const QByteArray &type,
  14. return true;
  15. }
  16.  
  17. + QString host(gCoreContext->GetSetting("BonjourHostname", ""));
  18. + QByteArray host_ba = host.toAscii();
  19. + const char *host_ptr = host.size() > 0 ? host_ba.constData() : NULL;
  20. uint16_t qport = qToBigEndian(port);
  21. DNSServiceErrorType res =
  22. DNSServiceRegister(&m_dnssref, 0, 0, (const char*)name.data(),
  23. (const char*)type.data(),
  24. - NULL, 0, qport, txt.size(), (void*)txt.data(),
  25. + NULL, host_ptr, qport, txt.size(), (void*)txt.data(),
  26. BonjourCallback, this);
  27.  
  28. if (kDNSServiceErr_NoError != res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement