From 72a2d4b6900a339393bcb678fb5357688247f28b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 21 Mar 2006 10:30:45 +0000 Subject: [PATCH] info() about opening of stores --- src/isync.h | 2 ++ src/main.c | 11 +++++++---- src/sync.c | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/isync.h b/src/isync.h index b904612..a7447f3 100644 --- a/src/isync.h +++ b/src/isync.h @@ -246,6 +246,8 @@ unsigned char arc4_getbyte( void ); /* sync.c */ +extern const char *str_ms[2], *str_hl[2]; + #define SYNC_OK 0 #define SYNC_FAIL 1 #define SYNC_BAD(ms) (2+(ms)) diff --git a/src/main.c b/src/main.c index b0c64c8..23e8207 100644 --- a/src/main.c +++ b/src/main.c @@ -481,17 +481,20 @@ main( int argc, char **argv ) merge_actions( chan, ops, XOP_HAVE_CREATE, OP_CREATE, 0 ); merge_actions( chan, ops, XOP_HAVE_EXPUNGE, OP_EXPUNGE, 0 ); + info( "Channel %s\n", chan->name ); boxes[M] = boxes[S] = cboxes = 0; for (t = 0; t < 2; t++) { driver[t] = chan->stores[t]->driver; ctx[t] = driver[t]->own_store( chan->stores[t] ); } for (t = 0; t < 2; t++) - if (!ctx[t] && !(ctx[t] = driver[t]->open_store( chan->stores[t] ))) { - ret = 1; - goto next; + if (!ctx[t]) { + info( "Opening %s %s...\n", str_ms[t], chan->stores[t]->name ); + if (!(ctx[t] = driver[t]->open_store( chan->stores[t] ))) { + ret = 1; + goto next; + } } - info( "Channel %s\n", chan->name ); if (list && multiple) printf( "%s:\n", chan->name ); if (boxlist) { diff --git a/src/sync.c b/src/sync.c index f8df5d0..5d2f5bf 100644 --- a/src/sync.c +++ b/src/sync.c @@ -33,7 +33,7 @@ #include #include -static const char *str_ms[] = { "master", "slave" }, *str_hl[] = { "push", "pull" }; +const char *str_ms[] = { "master", "slave" }, *str_hl[] = { "push", "pull" }; void Fclose( FILE *f )