diff --git a/src/teamspeak2.c b/src/teamspeak2.c
index 201e1828a2b2037093fde4b02c45709a53d6d062..345f57e0d6a5c534fe57d3a946cd6555e95f9e72 100644 (file)
--- a/src/teamspeak2.c
+++ b/src/teamspeak2.c
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
-#include <sys/socket.h>
#include <netdb.h>
/*
#include <netdb.h>
/*
}
/* Allocate memory */
}
/* Allocate memory */
- entry = (vserver_list_t *) malloc (sizeof (vserver_list_t));
+ entry = malloc (sizeof (*entry));
if (entry == NULL)
{
ERROR ("teamspeak2 plugin: malloc failed.");
if (entry == NULL)
{
ERROR ("teamspeak2 plugin: malloc failed.");
WARNING ("teamspeak2 plugin: connect failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
close (sd);
WARNING ("teamspeak2 plugin: connect failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
close (sd);
+ sd = -1;
continue;
}
continue;
}