aboutsummaryrefslogtreecommitdiff
path: root/mDNSPosix
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2012-04-06 11:51:32 -0700
committerRobert Greenwalt <rgreenwalt@google.com>2012-04-10 14:28:12 -0700
commitafc86e3216439a9437ea54905853275111eac4e2 (patch)
tree9962613f961492831200bc05f8351a5e39220dbb /mDNSPosix
parentdd52342e088715929196886494c5055f9186d5c3 (diff)
downloadmdnsresponder-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-xmDNSPosix/mDNSPosix.c5
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;
}