diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2012-04-06 11:51:32 -0700 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2012-04-10 14:28:12 -0700 |
commit | afc86e3216439a9437ea54905853275111eac4e2 (patch) | |
tree | 9962613f961492831200bc05f8351a5e39220dbb /mDNSPosix | |
parent | dd52342e088715929196886494c5055f9186d5c3 (diff) | |
download | mdnsresponder-afc86e3216439a9437ea54905853275111eac4e2.tar.gz |
Reduce MDNS logging
If it's compiled with no debugging turned on we should not log all
the info and warning and stuff.
Change-Id: Ifacfeca81d24a8a542e3ce2eb0684643eb35e166
Diffstat (limited to 'mDNSPosix')
-rwxr-xr-x | mDNSPosix/mDNSPosix.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c index c4674c3..ee0b335 100755 --- a/mDNSPosix/mDNSPosix.c +++ b/mDNSPosix/mDNSPosix.c @@ -475,7 +475,12 @@ mDNSexport void mDNSPlatformDynDNSHostNameStatusChanged(const domainname *const mDNSlocal void GetUserSpecifiedRFC1034ComputerName(domainlabel *const namelabel) { int len = 0; +#ifndef __ANDROID__ gethostname((char *)(&namelabel->c[1]), MAX_DOMAIN_LABEL); +#else + // use an appropriate default label rather than the linux default of 'localhost' + strncpy(&namelabel->c[1], "Android", MAX_DOMAIN_LABEL); +#endif while (len < MAX_DOMAIN_LABEL && namelabel->c[len+1] && namelabel->c[len+1] != '.') len++; namelabel->c[0] = len; } |