Signed-off-by: Colin McCabe <[email protected]>
---
 server/cldu.c   |   14 ++++++++++++--
 server/tabled.h |    1 +
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/server/cldu.c b/server/cldu.c
index e66ec02..e256e6a 100644
--- a/server/cldu.c
+++ b/server/cldu.c
@@ -918,6 +918,11 @@ int cld_begin(const char *thishost, const char *thiscell)
 {
        static struct cld_session *sp = &ses;
 
+       const struct hail_log hail_log = {
+               .func = applog,
+               .verbose = debugging,
+       };
+
        evtimer_set(&ses.tm_retry, cldu_tm_retry, &ses);
        evtimer_set(&ses.tm_rescan, cldu_tm_rescan, &ses);
        evtimer_set(&ses.tm_reopen, cldu_tm_reopen, &ses);
@@ -931,7 +936,7 @@ int cld_begin(const char *thishost, const char *thiscell)
                GList *tmp, *host_list = NULL;
                int i;
 
-               if (cldc_getaddr(&host_list, thishost, debugging, applog)) {
+               if (cldc_getaddr(&host_list, thishost, &hail_log)) {
                        /* Already logged error */
                        goto err_addr;
                }
@@ -981,6 +986,11 @@ void cldu_add_host(const char *hostname, unsigned int port)
        struct cld_host *hp;
        int i;
 
+       const struct hail_log hail_log = {
+               .func = applog,
+               .verbose = debugging,
+       };
+
        for (i = 0; i < N_CLD; i++) {
                hp = &sp->cldv[i];
                if (!hp->known)
@@ -990,7 +1000,7 @@ void cldu_add_host(const char *hostname, unsigned int port)
                return;
 
        if (cldc_saveaddr(&hp->h, 100, 100, port, strlen(hostname), hostname,
-                         debugging, applog))
+                         &hail_log))
                return;
        hp->known = 1;
 
diff --git a/server/tabled.h b/server/tabled.h
index fd6142e..cc93d3c 100644
--- a/server/tabled.h
+++ b/server/tabled.h
@@ -313,6 +313,7 @@ extern bool cli_write_start(struct client *cli);
 extern int cli_req_avail(struct client *cli);
 extern void applog(int prio, const char *fmt, ...);
 extern int stor_update_cb(void);
+extern const struct hail_log hail_log;
 
 /* config.c */
 extern void read_config(void);
-- 
1.6.2.5

--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to