Don't allow forcing transactions on if they are not supported by DB schema.
authorZdeněk Salvet <salvet@ics.muni.cz>
Fri, 13 Jul 2007 08:51:01 +0000 (08:51 +0000)
committerZdeněk Salvet <salvet@ics.muni.cz>
Fri, 13 Jul 2007 08:51:01 +0000 (08:51 +0000)
org.glite.lb.server/src/bkserverd.c

index 0840a9e..10cc346 100644 (file)
@@ -581,6 +581,7 @@ a.sin_addr.s_addr = INADDR_ANY;
        edg_wll_InitContext(&ctx);
        wait_for_open(ctx, dbstring);
 
+       ctx->use_transactions = transactions;
        if (edg_wll_DBCheckVersion(ctx, dbstring))
        {
                char    *et,*ed;
@@ -594,10 +595,6 @@ a.sin_addr.s_addr = INADDR_ANY;
        if (!ctx->use_transactions && transactions != 0) {
                fprintf(stderr, "[%d]: transactions aren't supported!\n", getpid());
        }
-       if (transactions >= 0) {
-               fprintf(stderr, "[%d]: transactions forced from %d to %d\n", getpid(), ctx->use_transactions, transactions);
-               ctx->use_transactions = transactions;
-       }
        use_transactions = ctx->use_transactions;
        edg_wll_Close(ctx);
        edg_wll_FreeContext(ctx);