Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21788/mil

Modified Files:
      Tag: xrpcdemo
        milprint_summer.c 
Log Message:
make it also possible to use xrpc:mode option when, xrpc:isolation is
declared.



U milprint_summer.c
Index: milprint_summer.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint_summer.c,v
retrieving revision 1.419.4.8
retrieving revision 1.419.4.9
diff -u -d -r1.419.4.8 -r1.419.4.9
--- milprint_summer.c   9 Jun 2008 05:27:17 -0000       1.419.4.8
+++ milprint_summer.c   9 Jun 2008 19:37:01 -0000       1.419.4.9
@@ -6343,7 +6343,6 @@
                  counter, counter, counter, counter,
                  counter, counter, counter, counter);
 
-
     /* Define a variable to hold the results of a function call.
      * call rpc_sender => cont~=kind
      * extract return value (s) from the message node
@@ -11729,15 +11728,23 @@
     opt_output(f, OPT_SEC_QUERY);
 
     /* get options */
+    char *xrpc_iso = NULL, *xrpc_mode = NULL;
     opt = PFenv_lookup(PFoptions, PFqname(PFns_xrpc, "isolation"));
-    if (opt == NULL) 
-        opt = PFenv_lookup(PFoptions, PFqname(PFns_xrpc, "mode"));
     if(opt) {
-        char* xrpc_mode = *((char **) PFarray_top (opt));
-        milprintf(f, "xrpc_mode := \"%s\";\n", xrpc_mode);
+        xrpc_iso =  *((char **) PFarray_top (opt));
+        if(PFarray_last(opt) > 1)
+            PFoops(OOPS_FATAL, "Multiple declarations of option 
'xrpc:isolation' not allowed!");
+    }
+    opt = PFenv_lookup(PFoptions, PFqname(PFns_xrpc, "mode"));
+    if(opt) {
+        xrpc_mode = *((char **) PFarray_top (opt));
         if(PFarray_last(opt) > 1)
             PFoops(OOPS_FATAL, "Multiple declarations of option 'xrpc:mode' 
not allowed!");
     }
+    if(xrpc_iso && xrpc_mode)
+        milprintf(f, "xrpc_mode := \"%s-%s\";\n", xrpc_iso, xrpc_mode);
+    else if(xrpc_iso || xrpc_mode)
+        milprintf(f, "xrpc_mode := \"%s\";\n", xrpc_iso ? xrpc_iso : 
xrpc_mode);
     opt = PFenv_lookup(PFoptions, PFqname(PFns_xrpc, "timeout"));
     if (opt) {
         long long timeout = strtoll(*((char **) PFarray_top (opt)), NULL, 10);


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to