commit 9eba3d8cd9f73ddd12f450f17632c431fc94dfbf
Author: Oswald Buddenhagen <[email protected]>
Date:   Fri Jan 2 11:29:51 2015 +0100

    don't leave 2nd store in limbo if opening 1st store fails synchronously
    
    we can't leave the store FRESH, as otherwise the error handling code
    will assume it is still being opened and will return to the main loop.
    depending on the config this would cause an immediate termination or an
    indefinite wait.

 src/main.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/main.c b/src/main.c
index 3efd179..770de0d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -593,12 +593,16 @@ sync_chans( main_vars_t *mvars, int ent )
                        labels[M] = "M: ", labels[S] = "S: ";
                else
                        labels[M] = labels[S] = "";
-               for (t = 0; t < 2; t++) {
+               for (t = 0; ; t++) {
                        info( "Opening %s %s...\n", str_ms[t], 
mvars->chan->stores[t]->name );
                        mvars->drv[t] = mvars->chan->stores[t]->driver;
                        mvars->drv[t]->open_store( mvars->chan->stores[t], 
labels[t], store_opened, AUX );
-                       if (mvars->skip)
+                       if (t)
                                break;
+                       if (mvars->skip) {
+                               mvars->state[1] = ST_CLOSED;
+                               break;
+                       }
                }
                mvars->cben = 1;
          opened:

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to