Don't reset reg state if register can not be opened
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 31 Oct 2011 14:17:09 +0000 (15:17 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 31 Oct 2011 14:17:09 +0000 (15:17 +0100)
If zebra_register_open fails, do not set state back to 'o', since
it may be dirty (half transaction).

index/zebraapi.c

index 1c30eaa..6415172 100644 (file)
@@ -1816,8 +1816,6 @@ ZEBRA_RES zebra_begin_trans(ZebraHandle zh, int rw)
             zh->reg->seqno = seqno;
         else
         {
-            zebra_set_state(zh, 'o', seqno);
-            
             zebra_unlock(zh->lock_shadow);
             zebra_unlock(zh->lock_normal);