summaryrefslogtreecommitdiff
path: root/aserver
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-28 16:21:14 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-28 16:23:06 +0100
commitdbb7eca6559e970bd015eaa95a9e0525660fa09e (patch)
tree44a01d5e354827c114f0a3c88f0339312243d31c /aserver
parent6ea14c3624c0cbcf90e7d5859b4af629523b8d82 (diff)
Remove unused hostname resolution in shm plugins and aserver
PCM and control shm plugins and aserver have some codes to resolve the host address and check whether it's a local host although the given address is never used. In addition, the code contains gethostbyname() that is known to be obsoleted. So, let's get rid of all these unused codes. The host configuration item is still accepted (but just ignored) for keeping the compatibility. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'aserver')
-rw-r--r--aserver/aserver.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/aserver/aserver.c b/aserver/aserver.c
index 73ea4e95..1579da7b 100644
--- a/aserver/aserver.c
+++ b/aserver/aserver.c
@@ -1013,11 +1013,10 @@ int main(int argc, char **argv)
snd_config_t *conf;
snd_config_iterator_t i, next;
const char *sockname = NULL;
- const char *host = NULL;
long port = -1;
int err;
char *srvname;
- struct hostent *h;
+
command = argv[0];
while ((c = getopt_long(argc, argv, "h", long_options, 0)) != -1) {
switch (c) {
@@ -1055,14 +1054,8 @@ int main(int argc, char **argv)
continue;
if (strcmp(id, "comment") == 0)
continue;
- if (strcmp(id, "host") == 0) {
- err = snd_config_get_string(n, &host);
- if (err < 0) {
- ERROR("Invalid type for %s", id);
- return 1;
- }
+ if (strcmp(id, "host") == 0)
continue;
- }
if (strcmp(id, "socket") == 0) {
err = snd_config_get_string(n, &sockname);
if (err < 0) {
@@ -1082,19 +1075,6 @@ int main(int argc, char **argv)
ERROR("Unknown field %s", id);
return 1;
}
- if (!host) {
- ERROR("host is not defined");
- return 1;
- }
- h = gethostbyname(host);
- if (!h) {
- ERROR("Cannot resolve %s", host);
- return 1;
- }
- if (!snd_is_local(h)) {
- ERROR("%s is not the local host", host);
- return 1;
- }
if (!sockname && port < 0) {
ERROR("either socket or port need to be defined");
return 1;