projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bce7ddc
)
Check that hostname and domainname is valid
author
Marcel Holtmann
<marcel@holtmann.org>
Thu, 23 Apr 2009 00:04:38 +0000
(
01:04
+0100)
committer
Marcel Holtmann
<marcel@holtmann.org>
Thu, 23 Apr 2009 00:04:38 +0000
(
01:04
+0100)
plugins/loopback.c
patch
|
blob
|
history
diff --git
a/plugins/loopback.c
b/plugins/loopback.c
index
0a3a1d3
..
04bd7a1
100644
(file)
--- a/
plugins/loopback.c
+++ b/
plugins/loopback.c
@@
-145,7
+145,8
@@
static int setup_hostname(void)
return -EIO;
}
- connman_info("System hostname is %s", name);
+ if (strlen(name) > 0 && strcmp(name, "(none)") != 0)
+ connman_info("System hostname is %s", name);
memset(name, 0, sizeof(name));
@@
-154,10
+155,8
@@
static int setup_hostname(void)
return -EIO;
}
- if (strcmp(name, "(none)") == 0)
- return 0;
-
- connman_info("System domainname is %s", name);
+ if (strlen(name) > 0 && strcmp(name, "(none)") != 0)
+ connman_info("System domainname is %s", name);
return 0;
}