summaryrefslogtreecommitdiff
path: root/ctdb/tcp
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-02-04 20:07:15 +1100
committerAndrew Tridgell <tridge@samba.org>2008-02-04 20:07:15 +1100
commitf6e53f433bf8e184ffc281f14c4eacda1ffc935c (patch)
tree577c389c61b4a0d7b51fbf0a0294cbd84bc79f48 /ctdb/tcp
parent9d6ac0cf559535e8ac7082125692afd287b353e5 (diff)
downloadsamba-f6e53f433bf8e184ffc281f14c4eacda1ffc935c.tar.gz
merge from ronnie
(This used to be ctdb commit e7b57d38cf7255be823a223cf15b7526285b4f1c)
Diffstat (limited to 'ctdb/tcp')
-rw-r--r--ctdb/tcp/tcp_connect.c8
-rw-r--r--ctdb/tcp/tcp_init.c4
-rw-r--r--ctdb/tcp/tcp_io.c10
3 files changed, 11 insertions, 11 deletions
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index 0d1f402c24d..1bad440d01a 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -217,7 +217,7 @@ static void ctdb_listen_event(struct event_context *ev, struct fd_event *fde,
nodeid = ctdb_ip_to_nodeid(ctdb, incoming_node);
if (nodeid == -1) {
- DEBUG(0, ("Refused connection from unknown node %s\n", incoming_node));
+ DEBUG(DEBUG_WARNING, ("Refused connection from unknown node %s\n", incoming_node));
close(fd);
return;
}
@@ -254,7 +254,7 @@ static int ctdb_tcp_listen_automatic(struct ctdb_context *ctdb)
binds if the first socket is in LISTEN state */
lock_fd = open(lock_path, O_RDWR|O_CREAT, 0666);
if (lock_fd == -1) {
- DEBUG(0,("Unable to open %s\n", lock_path));
+ DEBUG(DEBUG_CRIT,("Unable to open %s\n", lock_path));
return -1;
}
@@ -265,7 +265,7 @@ static int ctdb_tcp_listen_automatic(struct ctdb_context *ctdb)
lock.l_pid = 0;
if (fcntl(lock_fd, F_SETLKW, &lock) != 0) {
- DEBUG(0,("Unable to lock %s\n", lock_path));
+ DEBUG(DEBUG_CRIT,("Unable to lock %s\n", lock_path));
close(lock_fd);
return -1;
}
@@ -299,7 +299,7 @@ static int ctdb_tcp_listen_automatic(struct ctdb_context *ctdb)
}
if (i == ctdb->num_nodes) {
- DEBUG(0,("Unable to bind to any of the node addresses - giving up\n"));
+ DEBUG(DEBUG_CRIT,("Unable to bind to any of the node addresses - giving up\n"));
goto failed;
}
ctdb->address = ctdb->nodes[i]->address;
diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c
index a47a18d2989..624f6507efc 100644
--- a/ctdb/tcp/tcp_init.c
+++ b/ctdb/tcp/tcp_init.c
@@ -58,7 +58,7 @@ static int ctdb_tcp_initialise(struct ctdb_context *ctdb)
for (i=0; i<ctdb->num_nodes; i++) {
if (ctdb_tcp_add_node(ctdb->nodes[i]) != 0) {
- DEBUG(0, ("methods->add_node failed at %d\n", i));
+ DEBUG(DEBUG_CRIT, ("methods->add_node failed at %d\n", i));
return -1;
}
}
@@ -98,7 +98,7 @@ static void ctdb_tcp_restart(struct ctdb_node *node)
struct ctdb_tcp_node *tnode = talloc_get_type(
node->private_data, struct ctdb_tcp_node);
- DEBUG(0,("Tearing down connection to dead node :%d\n", node->pnn));
+ DEBUG(DEBUG_NOTICE,("Tearing down connection to dead node :%d\n", node->pnn));
ctdb_tcp_stop_connection(node);
diff --git a/ctdb/tcp/tcp_io.c b/ctdb/tcp/tcp_io.c
index c10afb34259..10711d1ea18 100644
--- a/ctdb/tcp/tcp_io.c
+++ b/ctdb/tcp/tcp_io.c
@@ -41,31 +41,31 @@ void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args)
}
if (cnt < sizeof(*hdr)) {
- DEBUG(0,(__location__ " Bad packet length %u\n", (unsigned)cnt));
+ DEBUG(DEBUG_ALERT,(__location__ " Bad packet length %u\n", (unsigned)cnt));
goto failed;
}
if (cnt & (CTDB_TCP_ALIGNMENT-1)) {
- DEBUG(0,(__location__ " Length 0x%x not multiple of alignment\n",
+ DEBUG(DEBUG_ALERT,(__location__ " Length 0x%x not multiple of alignment\n",
(unsigned)cnt));
goto failed;
}
if (cnt != hdr->length) {
- DEBUG(0,(__location__ " Bad header length %u expected %u\n",
+ DEBUG(DEBUG_ALERT,(__location__ " Bad header length %u expected %u\n",
(unsigned)hdr->length, (unsigned)cnt));
goto failed;
}
if (hdr->ctdb_magic != CTDB_MAGIC) {
- DEBUG(0,(__location__ " Non CTDB packet 0x%x rejected\n",
+ DEBUG(DEBUG_ALERT,(__location__ " Non CTDB packet 0x%x rejected\n",
hdr->ctdb_magic));
goto failed;
}
if (hdr->ctdb_version != CTDB_VERSION) {
- DEBUG(0, (__location__ " Bad CTDB version 0x%x rejected\n",
+ DEBUG(DEBUG_ALERT, (__location__ " Bad CTDB version 0x%x rejected\n",
hdr->ctdb_version));
goto failed;
}