]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
fixed some debug messages
authorAndrew Tridgell <tridge@samba.org>
Tue, 29 May 2007 03:48:30 +0000 (13:48 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 29 May 2007 03:48:30 +0000 (13:48 +1000)
(This used to be ctdb commit 037f0149c0c0e65af0a1669b9a52586129e4b48f)

ctdb/common/ctdb_daemon.c
ctdb/common/ctdb_ltdb.c
ctdb/common/ctdb_recoverd.c
ctdb/include/ctdb_private.h
ctdb/lib/util/debug.h
ctdb/takeover/ctdb_takeover.c

index 435c1b1ea3ca2e85356069d80351ca79c59b8992..6b76c1824cf60d76db455ff532c2feef73c78779 100644 (file)
@@ -617,11 +617,11 @@ static int ux_socket_bind(struct ctdb_context *ctdb)
        strncpy(addr.sun_path, ctdb->daemon.name, sizeof(addr.sun_path));
 
        if (bind(ctdb->daemon.sd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
-               DEBUG(0,("Unable to bind on ctdb socket '%s', ctdb->daemon.name\n"));
+               DEBUG(0,("Unable to bind on ctdb socket '%s'\n", ctdb->daemon.name));
                goto failed;
        }       
        if (listen(ctdb->daemon.sd, 10) != 0) {
-               DEBUG(0,("Unable to listen on ctdb socket '%s', ctdb->daemon.name\n"));
+               DEBUG(0,("Unable to listen on ctdb socket '%s'\n", ctdb->daemon.name));
                goto failed;
        }
 
index 501d89a38b41aa961340b41bf48f60a5c0db2e78..0347c46ae62a4f111c3ec2732d5fe70eba9f0397 100644 (file)
@@ -367,7 +367,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
        for (tmp_db=ctdb->db_list;tmp_db;tmp_db=tmp_db->next) {
                if (tmp_db->db_id == ctdb_db->db_id) {
                        DEBUG(0,("db_id 0x%x hash collision. name1='%s' name2='%s'\n",
-                                db_name, tmp_db->db_name));
+                                tmp_db->db_id, db_name, tmp_db->db_name));
                        talloc_free(ctdb_db);
                        return -1;
                }
@@ -448,7 +448,7 @@ int32_t ctdb_ltdb_update_seqnum(struct ctdb_context *ctdb, uint32_t db_id, uint3
 
        ctdb_db = find_ctdb_db(ctdb, db_id);
        if (!ctdb_db) {
-               DEBUG(0,("Unknown db_id 0x%x in ctdb_ltdb_update_seqnum\n"));
+               DEBUG(0,("Unknown db_id 0x%x in ctdb_ltdb_update_seqnum\n", db_id));
                return -1;
        }
 
@@ -491,7 +491,7 @@ int32_t ctdb_ltdb_enable_seqnum(struct ctdb_context *ctdb, uint32_t db_id)
        struct ctdb_db_context *ctdb_db;
        ctdb_db = find_ctdb_db(ctdb, db_id);
        if (!ctdb_db) {
-               DEBUG(0,("Unknown db_id 0x%x in ctdb_ltdb_enable_seqnum\n"));
+               DEBUG(0,("Unknown db_id 0x%x in ctdb_ltdb_enable_seqnum\n", db_id));
                return -1;
        }
 
index 3f8882ce79d3d05ddc8019f2334182c11ec4b6da..2dbc9e1ce6e57886e46b1edc0108d462c2d65342 100644 (file)
@@ -546,7 +546,7 @@ static int do_recovery(struct ctdb_context *ctdb,
        if (ctdb->takeover.enabled) {
                ret = ctdb_takeover_run(ctdb, nodemap);
                if (ret != 0) {
-                       DEBUG(0, (__location__, " Unable to setup public takeover addresses\n"));
+                       DEBUG(0, (__location__ " Unable to setup public takeover addresses\n"));
                        return -1;
                }
        }
index b7539cbbae4ec8698492c19fb35d802454126406..07dc38d8739baaee9eb8387620db4737a3e50f11 100644 (file)
@@ -945,7 +945,9 @@ int32_t ctdb_control_tcp_remove(struct ctdb_context *ctdb, TDB_DATA indata);
 int32_t ctdb_control_startup(struct ctdb_context *ctdb, uint32_t vnn);
 
 void ctdb_takeover_client_destructor_hook(struct ctdb_client *client);
-int ctdb_event_script(struct ctdb_context *ctdb, const char *fmt, ...);
+int ctdb_event_script(struct ctdb_context *ctdb, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 void ctdb_release_all_ips(struct ctdb_context *ctdb);
 
+
+
 #endif
index bc1e8f9423752aff647ff9bd815617fd09460f3b..109b642394f1c3a8590c6296cd4bbe3c6b37534f 100644 (file)
@@ -18,4 +18,4 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-void do_debug(const char *format, ...);
+void do_debug(const char *format, ...) PRINTF_ATTRIBUTE(1, 2);
index 55f69d5e9462426170cd7653e0dccf9123de5423..a9a01d75e1bf1803a00c5bb5de7ca722e3eec7f1 100644 (file)
@@ -239,7 +239,7 @@ int ctdb_set_public_addresses(struct ctdb_context *ctdb, const char *alist)
        }
 
        if (nlines != ctdb->num_nodes) {
-               DEBUG(0,("Number of lines in %s does not match number of nodes!\n"));
+               DEBUG(0,("Number of lines in %s does not match number of nodes!\n", alist));
                talloc_free(lines);
                return -1;
        }