solaris-fixes branch: Applied the swap-patch by Christophe Kalt.
[collectd.git] / src / network.c
index 1ecb9d7..54f9bfa 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * collectd - src/network.c
- * Copyright (C) 2006  Florian octo Forster
+ * Copyright (C) 2005,2006  Florian octo Forster
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
 
 #define BUFF_SIZE 4096
 
-#ifdef HAVE_LIBRRD
 extern int operating_mode;
-#else
-static int operating_mode = MODE_CLIENT;
-#endif
 
 typedef struct sockent
 {
@@ -218,7 +214,7 @@ int network_create_socket (const char *node, const char *service)
 
        DBG ("node = %s, service = %s", node, service);
 
-       if (operating_mode == MODE_LOCAL)
+       if (operating_mode == MODE_LOCAL || operating_mode == MODE_LOG)
                return (-1);
 
        socklist_tail = socklist_head;
@@ -516,8 +512,6 @@ int network_send (char *type, char *inst, char *value)
                if (se->mode != operating_mode)
                        continue;
 
-               DBG ("fd = %i", se->fd);
-
                while (1)
                {
                        status = sendto (se->fd, buf, buflen, 0,