Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3277

Modified Files:
      Tag: xrpcdemo
        pathfinder.mx serialize.mx serialize_dflt.mx shredder.mx 
        xrpc_client.mx xrpc_server.mx 
Log Message:
fixes for the demo



U pathfinder.mx
Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.416.2.1.2.12
retrieving revision 1.416.2.1.2.13
diff -u -d -r1.416.2.1.2.12 -r1.416.2.1.2.13
--- pathfinder.mx       9 Jun 2008 05:27:17 -0000       1.416.2.1.2.12
+++ pathfinder.mx       10 Jun 2008 04:55:39 -0000      1.416.2.1.2.13
@@ -4889,7 +4889,7 @@
         @:bunappend(item, &id, (size_t) *(oid*), SZFMT, "@0")@
     } else {
         @:bunappend(item, val, (size_t) *(oid*), SZFMT, "@0")@
-        k = (cont << 6) | (t == XS_ATTRIBUTE)?ATTR:ELEM;
+        k = (cont << 6) | ((t == XS_ATTRIBUTE)?ATTR:ELEM);
     }
     @:bunappend(kind, &k, *(int*), "%d")@
     return NULL;
@@ -5500,7 +5500,7 @@
      * session the old values are overwritten (and cleant up in MIL).
      */
     Variable v = monet_cntxt[ctx->stk].var;
-    while(v && strcmp(v->name, "vu_vid")) {
+    while(v && strcmp(v->name, "v_vid000")) {
         if (v->binding.vtype == TYPE_bat) {
           BBPdecref(v->binding.val.bval, TRUE);
           v->binding.vtype = TYPE_int;

U serialize.mx
Index: serialize.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/serialize.mx,v
retrieving revision 1.109.4.5
retrieving revision 1.109.4.6
diff -u -d -r1.109.4.5 -r1.109.4.6
--- serialize.mx        9 Jun 2008 19:35:03 -0000       1.109.4.5
+++ serialize.mx        10 Jun 2008 04:55:42 -0000      1.109.4.6
@@ -1973,18 +1973,30 @@
     return GDK_SUCCEED;
 }
 
+char xrpc_logdir_buf[1024], *xrpc_logdir = NULL;
+static char* get_xrpc_logdir() {
+    char *logdir;
+    if (xrpc_logdir == NULL && (logdir = GDKgetenv("datadir")) != NULL) {
+        snprintf(xrpc_logdir_buf, 1024, "%s%cMonetDB%cxrpc%clogs%c", logdir, 
DIR_SEP, DIR_SEP, DIR_SEP, DIR_SEP);
+        if (GDKcreatedir(xrpc_logdir_buf)) {
+            xrpc_logdir = xrpc_logdir_buf;
+        } else {
+            GDKerror("get_xrpc_logdir: directory %s not writable.", 
xrpc_logdir_buf);
+        }
+    }
+    return xrpc_logdir;
+}
+
 stream*
 xquery_print_trace(str msg, lng xrpc_seqnr) {
-    char logdir[1024], logfile[1024], *docroot = GDKgetenv("datadir");
-    stream* fp;
-    if (docroot) {
-        snprintf(logdir, 1024, "%s%cMonetDB%cxrpc%clogs%c", docroot, DIR_SEP, 
DIR_SEP, DIR_SEP, DIR_SEP);
+    char logfile[1024], *logdir = get_xrpc_logdir();
+    stream* fp = NULL;
+    if (logdir) {
         snprintf(logfile, 1024, "%s%s_" LLFMT ".xml", logdir, msg, xrpc_seqnr);
-        GDKcreatedir(logdir);
         fp = open_wastream(logfile);
     }
     if (!fp || stream_errnr(fp)) {
-        GDKerror("print_result: could not open logfile %s for writing\n", 
logfile);
+        GDKerror("print_result: could not open logfile for writing\n");
         if (fp) stream_destroy(fp);
         return NULL;
     }
@@ -2000,29 +2012,27 @@
 {
     int ret = 0;
     stream *s = NULL;
-    char *docroot = NULL, *ptr = NULL;
+    char *ptr = NULL, *logdir = get_xrpc_logdir();
     char base_name[2048], dotFile[2052], caller[1024], dst[1024];
     char dstNID[1024], fcn[1024], time[64], *seqnr = NULL;
+    char dotcmd[1024];
     BUN p, q;
     BATiter bi;
 
-    if(!(docroot = GDKgetenv("xrpc_http_docroot"))) {
-        GDKerror("draw_queryflow: xrpc_http_docroot not found");
-        return GDK_FAIL;
-    }
-    snprintf(base_name, 2048, "%s%clogs%cqflow_"LLFMT, docroot, DIR_SEP, 
DIR_SEP, xrpc_seqnr);
+    if (logdir == NULL) return GDK_FAIL;
+    snprintf(base_name, 2048, "%s%cqflow_"LLFMT, logdir, DIR_SEP, xrpc_seqnr);
     snprintf(dotFile, 2048, "%s.dot", base_name);
-    if(!(s = open_wstream(dotFile))) return GDK_FAIL;
 
     /* replace all non-alpha-numeric chars in the string with '_', so
      * that it can be used as the ID of nodes in dot file */
     strcpy(dstNID, xrpc_hostname);
-    ptr = dstNID;
-    do { if(!isalnum(ptr[0])) ptr[0] = '_'; ptr++; } while (ptr[0]);
-    ret = strlen(xrpc_hostname);
-    snprintf(dstNID + ret, 1024-ret, "_%d", xrpc_port);
+    for(ptr=dstNID; *ptr; ptr++) { 
+        if(!isalnum(*ptr)) *ptr = '_'; 
+    }
+    snprintf(ptr, 1024-(ptr-dstNID), "_%d", xrpc_port);
 
-    stream_printf(s,
+    if(!(s = open_wastream(dotFile))) return GDK_FAIL;
+    ret = stream_printf(s,
             "digraph G {\n"
             " ratio=2\n"
             " node [style=filled, color=\".7 .3 1.0\"];\n"
@@ -2039,18 +2049,19 @@
             xrpc_hostname, xrpc_port,
             dstNID, xrpc_seqnr, xrpc_method,
             dstNID, xrpc_seqnr, xrpc_hostname, xrpc_port, xrpc_seqnr,
-            dstNID, xrpc_seqnr, time_exec, xrpc_hostname, xrpc_port, 
xrpc_seqnr);
+            dstNID, xrpc_seqnr, time_exec, xrpc_hostname, xrpc_port, 
xrpc_seqnr) < 0;
 
     bi = bat_iterator(participants);
     BATloop(participants, p, q) {
-        ret = sscanf(BUNtail(bi,p), "%[^','],%[^','],%[^','],%s", caller, dst, 
fcn, time);
-        if(ret != 4) {
+        if (sscanf(BUNtail(bi,p), "%[^','],%[^','],%[^','],%s", caller, dst, 
fcn, time) != 4) {
             GDKerror("draw_queryflow: sscanf failed");
+            stream_destroy(s);
             return GDK_FAIL;
         }
         seqnr = strrchr(dst, ':');
         if(!seqnr) {
             GDKerror("draw_queryflow: invalid value of participant: %s.", dst);
+            stream_destroy(s);
             return GDK_FAIL;
         }
         seqnr[0] = '\0'; /* cut off the seqnr from the dst string */
@@ -2063,7 +2074,7 @@
         ptr = dstNID;
         do { if(!isalnum(ptr[0])) ptr[0] = '_'; ptr++; } while (ptr[0]);
 
-        stream_printf(s,
+        ret = ret || (stream_printf(s,
                 " subgraph cluster_%s {\n"
                 "   node [style=filled,color=\".7 .3 1.0\"];\n"   
                 "   style=filled;\n"
@@ -2076,33 +2087,16 @@
                 dstNID,
                 dst,
                 dstNID, seqnr, fcn,
-
                 caller, dstNID, seqnr, dst, seqnr,
-                dstNID, seqnr, caller, time, dst, seqnr);
+                dstNID, seqnr, caller, time, dst, seqnr) < 0);
     }
-    stream_write(s, "}", 1, 1);
-    stream_flush(s);
+    ret = ret || (stream_write(s, "}", 1, 1) < 0);
     stream_close(s);
     stream_destroy(s);
     
-    char mapArg[2055], gifArg[2055]; 
-    snprintf(mapArg, 2055, "-o%s.xml", base_name);
-    snprintf(gifArg, 2055, "-o%s.gif", base_name);
-    /*
-    char *argv[7];
-    argv[0] = "dot";
-    argv[1] = "-Tcmapx";
-    argv[2] = mapArg;
-    argv[3] = "-Tgif";
-    argv[4] = gifArg;
-    argv[5] = dotFile;
-    argv[6] = (char*)NULL;
-    */
-
-    if(execlp("dot", "dot", "-Tcmapx", mapArg, "-Tgif", gifArg, dotFile, 
(char*)NULL) < 0) {
-    //if(execvp("dot", argv) < 0) {
-        GDKerror("draw_queryflow: failed to generate query flow "
-                "graph using \"dot\": %s", strerror(errno));
+    snprintf(dotcmd, 1024, "dot -Tcmapx -o%s.xml -Tgif -o%s.gif %s", 
base_name, base_name, dotFile);
+    if (ret || system(dotcmd) < 0) {
+        GDKerror("draw_queryflow: failed to generate query flow graph using 
\"dot\"");
         return GDK_FAIL;
     }
 
@@ -2144,11 +2138,10 @@
         stream* logstream = xquery_print_trace("res",*xrpc_seqnr);
         fp = logstream?attach_teestream(fp, logstream):NULL;
         if (fp == NULL) return GDK_FAIL;
-        if (strcmp(xrpc_caller, "query.0") == 0) {
+        if (strcmp(xrpc_caller, "query") == 0) {
             BATiter wsi = bat_iterator(ws);
             BAT *participants = BATdescriptor(*(bat*) BUNtail(wsi, 
XRPC_PARTICIPANTS));
-            if(draw_queryflow(*xrpc_seqnr, xrpc_method, time_exec,
-                        participants) == GDK_FAIL)
+            if(draw_queryflow(*xrpc_seqnr, xrpc_method, time_exec, 
participants) == GDK_FAIL)
                 return GDK_FAIL;
         }
     }

U xrpc_client.mx
Index: xrpc_client.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc_client.mx,v
retrieving revision 1.45.4.10
retrieving revision 1.45.4.11
diff -u -d -r1.45.4.10 -r1.45.4.11
--- xrpc_client.mx      9 Jun 2008 19:36:47 -0000       1.45.4.10
+++ xrpc_client.mx      10 Jun 2008 04:55:44 -0000      1.45.4.11
@@ -130,10 +130,10 @@
         # order of 'fun_iter' needs to be preserved, so use 'leftjoin',
         # iso. 'join'.
         var fun_iter_dst := fun_iter.leftjoin(iter_dst);
-        var indices      := fun_iter_dst.mirror().hmark([EMAIL PROTECTED]);
-        var fun_vid_dst  := indices.fetchjoin(fun_vid).tmark([EMAIL 
PROTECTED]);
-        var fun_item_dst := indices.fetchjoin(fun_item).tmark([EMAIL 
PROTECTED]);
-        var fun_kind_dst := indices.fetchjoin(fun_kind).tmark([EMAIL 
PROTECTED]);
+        var indices      := fun_iter_dst.hmark([EMAIL PROTECTED]);
+        var fun_vid_dst  := indices.leftfetchjoin(fun_vid);
+        var fun_item_dst := indices.leftfetchjoin(fun_item);
+        var fun_kind_dst := indices.leftfetchjoin(fun_kind);
 
         # renumber the iters, starting from 1
         fun_iter_dst := fun_iter_dst.leftjoin(iter_dst.mark([EMAIL 
PROTECTED]));
@@ -150,8 +150,8 @@
         var rpc_err := CATCH(rpc_res := http_post(genType, xrpc_mode, xrpc_qid,
                     (xrpc_caller = ""),
                     xrpc_seqnr, timeout, $t, modname, location, method,
-                    updCall, arity, itercnt, ws, fun_vid, fun_iter, fun_item,
-                    fun_kind, int_values, dbl_values, dec_values, str_values));
+                    updCall, arity, itercnt, ws, fun_vid_dst, fun_iter_dst, 
fun_item_dst,
+                    fun_kind_dst, int_values, dbl_values, dec_values, 
str_values));
 
         var time_xrpcClntDeSeria := usec();
 
@@ -159,7 +159,7 @@
             if (not(updCall)) {
                 lock_set(rpcres_lock);
                 rpc_results.insert(local_name,rpc_res);
-                rpc_iter.append(iter_dst.hmark([EMAIL PROTECTED]));
+                rpc_iter.append(iter_dst.hmark([EMAIL PROTECTED]));
                 lock_unset(rpcres_lock);
             }
             time_xrpcClntDeSeria := usec() - time_xrpcClntDeSeria;
@@ -208,7 +208,8 @@
             [ws_opencoll](const ws, rpc_results.tmark([EMAIL PROTECTED]), 
rpc_results.hmark([EMAIL PROTECTED]), TEMP_DOC),
             const ws, const int_values, const dbl_values, const str_values);
 
-    res_iter := proc_res.[fetch](0).[leftfetchjoin](rpc_iter);
+    res_iter := bat(void,bat).seqbase([EMAIL PROTECTED]); 
+                proc_res.[fetch](0)@batloop() 
res_iter.append($t.leftfetchjoin(rpc_iter.find($h)));
     res_item := proc_res.[fetch](1);
     res_kind := proc_res.[fetch](2);
 
@@ -285,7 +286,8 @@
         var local_name := "rpc_res_00" + str(h+1);
         if (xrpc_qid != "") lock_unset(wslock);
         var rpc_res, timeout := max(0LL,xrpc_timeout - ((usec() - 
time_start)/1000));
-        var rpc_err := CATCH(rpc_res := http_post(genType, xrpc_mode, 
xrpc_qid, (xrpc_caller = ""), xrpc_seqnr, timeout, $t, modname, location, 
method,
+        var rpc_err := CATCH(rpc_res := http_post(genType, xrpc_mode, 
xrpc_qid, (xrpc_caller = ""), 
+                    xrpc_seqnr, timeout, $t, modname, location, method,
                     updCall, arity, lng(1), ws, cur_fun_vid, cur_fun_iter, 
cur_fun_item,
                     cur_fun_kind, int_values, dbl_values, dec_values, 
str_values));
         if (xrpc_qid != "") lock_set(wslock);

U serialize_dflt.mx
Index: serialize_dflt.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/serialize_dflt.mx,v
retrieving revision 1.46.4.8
retrieving revision 1.46.4.9
diff -u -d -r1.46.4.8 -r1.46.4.9
--- serialize_dflt.mx   9 Jun 2008 19:36:06 -0000       1.46.4.8
+++ serialize_dflt.mx   10 Jun 2008 04:55:43 -0000      1.46.4.9
@@ -992,13 +992,19 @@
 {
     int len, ret = 0;
    
+
     if (ctx->xrpc_qid[0] && ctx->time_exec > ctx->xrpc_timeout) {
         GDKerror("xrpc_startSerialize: xrpc-query timed out\n");
         return PROBLEM;
     }
 
-    len = strlen(HTTP_200_OK) + strlen(SOAP_ENVELOPE);
-    ret = stream_write(ctx->out, HTTP_200_OK SOAP_ENVELOPE, 1, len);
+    /* HACK: we use GDKout and not ctx->stdout because the logger stream 
should see only the XML content */
+    len = strlen(HTTP_200_OK);
+    ret = stream_write(GDKout, HTTP_200_OK, 1, len);
+    if(ret != len) return PROBLEM;
+
+    len = strlen(SOAP_ENVELOPE);
+    ret = stream_write(ctx->out, SOAP_ENVELOPE, 1, len);
     if(ret != len) return PROBLEM;
 
     if (ctx->xrpc_qid[0] || strstr(ctx->xrpc_mode,"trace")) {
@@ -1009,14 +1015,14 @@
 
         if (b == NULL) return PROBLEM;
 
-        ret = stream_printf(ctx->out, "<env:Header>");
+        ret = stream_printf(ctx->out, "<env:Header>\n");
         if (ret >= 0 && ctx->xrpc_qid[0])
             ret = stream_printf(ctx->out, XRPC_WS_QID, ctx->xrpc_qid, 
ctx->xrpc_timeout);
 
         /* XRPC participants lists for nested transactions - append an extra 
item for this call */
         if(ret >= 0)
             ret = stream_printf(ctx->out, 
-                "<xrpc:participants>\n  
<xrpc:participant>%s,%s:%d:"LLFMT",%s,"LLFMT"</xrpc:participant>\n",
+                " <xrpc:participants>\n  
<xrpc:participant>%s,%s:%d:"LLFMT",%s,"LLFMT"</xrpc:participant>\n",
                 ctx->xrpc_caller, xrpc_hostname, xrpc_port, ctx->xrpc_seqnr, 
ctx->xrpc_method, ctx->time_exec);
 
         /* print all nested calls (obtained from response messages)  */
@@ -1026,7 +1032,7 @@
             ret = stream_printf(ctx->out, "  
<xrpc:participant>%s</xrpc:participant>\n", BUNtail(bi,p));
         }
         if (ret >= 0) 
-            ret = stream_printf(ctx->out, 
"</xrpc:participants>\n</env:Header>\n");
+            ret = stream_printf(ctx->out, " 
</xrpc:participants>\n</env:Header>\n");
 
         BBPunfix(bid);
         if (ret < 0) return PROBLEM;

U shredder.mx
Index: shredder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/shredder.mx,v
retrieving revision 1.136.4.3
retrieving revision 1.136.4.4
diff -u -d -r1.136.4.3 -r1.136.4.4
--- shredder.mx 5 Jun 2008 12:55:22 -0000       1.136.4.3
+++ shredder.mx 10 Jun 2008 04:55:43 -0000      1.136.4.4
@@ -716,7 +716,7 @@
     {
         return BUNappend(histo, &cnt, TRUE)?res:oid_nil;
     } else if (res != oid_nil) {
-        BUN p = BUNlast(histo) - 1;
+        BUN p = (BUN) res;
         cnt = 1 + *(lng*) Tloc(histo,p);
         return BUNinplace(histo, p, NULL, &cnt, TRUE)?res:oid_nil;
     }

U xrpc_server.mx
Index: xrpc_server.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc_server.mx,v
retrieving revision 1.68.4.12
retrieving revision 1.68.4.13
diff -u -d -r1.68.4.12 -r1.68.4.13
--- xrpc_server.mx      9 Jun 2008 19:37:18 -0000       1.68.4.12
+++ xrpc_server.mx      10 Jun 2008 04:55:44 -0000      1.68.4.13
@@ -200,47 +200,52 @@
 /* XRPC SOAP snippets */
 #define SOAP_ENVELOPE\
     "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"\
-    "<env:Envelope xmlns:env=\"" SOAP_NS "\""\
-                 " xmlns:xrpc=\"" XRPC_NS "\""\
-                 " xmlns:xdt=\"" XDT_NS "\" "\
-                 " xmlns:xs=\"" XS_NS "\""\
-                 " xmlns:xsi=\"" XSI_NS "\""\
-                 " xsi:schemaLocation=\"" XRPC_NS " " XRPC_LOC "\">"
+    "<env:Envelope\n"\
+    "  xmlns:env=\"" SOAP_NS "\"\n"\
+    "  xmlns:xrpc=\"" XRPC_NS "\"\n"\
+    "  xmlns:xdt=\"" XDT_NS "\" \n"\
+    "  xmlns:xs=\"" XS_NS "\"\n"\
+    "  xmlns:xsi=\"" XSI_NS "\"\n"\
+    "  xsi:schemaLocation=\"" XRPC_NS " " XRPC_LOC "\">\n"
 
 #define XRPC_WS_QID\
-      "<wscoor:CoordinationContext xmlns:wscoor=\""WSCOOR_NS"\" "\
-                 "env:mustUnderstand=\"true\">"\
-        "<wscoor:Identifier>%s</wscoor:Identifier>"\
-        "<wscoor:Expires>"LLFMT"</wscoor:Expires>"\
-        "<wscoor:CoordinationType>" WSAT_NS "</wscoor:CoordinationType>"\
-      "</wscoor:CoordinationContext>"
+      " <wscoor:CoordinationContext\n"\
+      "  xmlns:wscoor=\""WSCOOR_NS"\"\n"\
+      "  env:mustUnderstand=\"true\">\n"\
+      "   <wscoor:Identifier>%s</wscoor:Identifier>\n"\
+      "   <wscoor:Expires>"LLFMT"</wscoor:Expires>\n"\
+      "   <wscoor:CoordinationType>" WSAT_NS "</wscoor:CoordinationType>\n"\
+      " </wscoor:CoordinationContext>\n"
 
 #define XRPC_REQ_HEADER\
-    "<env:Body>"\
-      "<xrpc:request xrpc:module=\"%s\""\
-                   " xrpc:location=\"%s\""\
-                   " xrpc:method=\"%s\""\
-                   " xrpc:arity=\"%lld\""\
-                   " xrpc:iter-count=\"%lld\""\
-                   " xrpc:caller=\"%s:%d:"LLFMT"\""\
-                   " xrpc:mode=\"%s\""\
-                   " xrpc:updCall=\"%s\">"
+    "<env:Body>\n"\
+      "<xrpc:request\n"\
+      "  xrpc:module=\"%s\"\n"\
+      "  xrpc:location=\"%s\"\n"\
+      "  xrpc:method=\"%s\"\n"\
+      "  xrpc:arity=\"%lld\"\n"\
+      "  xrpc:iter-count=\"%lld\"\n"\
+      "  xrpc:caller=\"%s:%d:"LLFMT"\"\n"\
+      "  xrpc:mode=\"%s\"\n"\
+      "  xrpc:updCall=\"%s\">\n"
 
 #define XRPC_REQ_HEADER_FIRST_CALLER\
-    "<env:Body>"\
-      "<xrpc:request xrpc:module=\"%s\""\
-                   " xrpc:location=\"%s\""\
-                   " xrpc:method=\"%s\""\
-                   " xrpc:arity=\"%lld\""\
-                   " xrpc:iter-count=\"%lld\""\
-                   " xrpc:caller=\"query.0\""\
-                   " xrpc:mode=\"%s\""\
-                   " xrpc:updCall=\"%s\">"
+    "<env:Body>\n"\
+    " <xrpc:request\n"\
+    "   xrpc:module=\"%s\"\n"\
+    "   xrpc:location=\"%s\"\n"\
+    "   xrpc:method=\"%s\"\n"\
+    "   xrpc:arity=\"%lld\"\n"\
+    "   xrpc:iter-count=\"%lld\"\n"\
+    "   xrpc:caller=\"query.0\"\n"\
+    "   xrpc:mode=\"%s\"\n"\
+    "   xrpc:updCall=\"%s\">\n"
 
 #define XRPC_RES_HEADER\
-    "<env:Body>"\
-      "<xrpc:response xrpc:module=\"%s\""\
-                    " xrpc:method=\"%s\">"
+    "<env:Body>\n"\
+    " <xrpc:response\n"\
+    "   xrpc:module=\"%s\"\n"\
+    "   xrpc:method=\"%s\">\n"
 
 #define XRPC_HTTP_CALL "<xrpc:call>"                                    \
                          "<xrpc:sequence>"                              \
@@ -261,8 +266,8 @@
                          "</xrpc:sequence>"                             \
                        "</xrpc:call>"
 
-#define XRPC_FOOTER     "</xrpc:request>"   \
-                      "</env:Body>"         \
+#define XRPC_FOOTER " </xrpc:request>\n"   \
+                    "</env:Body>\n"         \
                     "</env:Envelope>\n"
 
 #ifndef HOST_NAME_MAX
@@ -368,14 +373,18 @@
         stream_printf(out, "HTTP/1.1 %s\r\n"
             "Content-type: text/xml; charset=\"utf-8\"\r\n\r\n"
             "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
-            "<env:Envelope xmlns:env=\"%s\">"
-            "<env:Body>"
-            "<env:Fault>"
-            "<env:Code><env:Value>%s</env:Value></env:Code>"
-            "<env:Reason>"
-            "<env:Text xml:lang=\"en\">%s</env:Text>"
-            "</env:Reason>"
-            "</env:Fault></env:Body></env:Envelope>\n",
+            "<env:Envelope xmlns:env=\"%s\">\n"
+            " <env:Body>\n"
+            "  <env:Fault>\n"
+            "   <env:Code>\n"
+            "    <env:Value>%s</env:Value>\n"
+            "   </env:Code>\n"
+            "   <env:Reason>\n"
+            "    <env:Text xml:lang=\"en\">%s</env:Text>\n"
+            "   </env:Reason>\n"
+            "  </env:Fault>\n"
+            " </env:Body>\n"
+            "</env:Envelope>\n",
             http_err, SOAP_NS, soap_err, err_reason);
         stream_flush(out);
     }
@@ -600,7 +609,7 @@
     XRPCreq_t *req = NULL, *res = NULL;
     char* msg = participants?XRPC_RESPONSE:XRPC_REQUEST;
     char *module = NULL, *method = NULL, *location = NULL;
-    char *mode = NULL, *qid = NULL, *caller = "query,0";
+    char *mode = NULL, *qid = NULL, *caller = "query";
     char *arity_str = NULL, *itercnt_str = NULL;
     char *pul = NULL, *val = NULL;
     int updCall = FALSE;
@@ -1033,7 +1042,7 @@
         /* if error was caused by other problems, we haven't checked
          * query expiration time */
         snprintf(errbuf_all, GDKMAXERRLEN*2,
-                "Error occurred during execution:s\n%s\n%s",
+                "Error occurred during execution:\n%s\n%s",
                 *errbuf ? errbuf : "",
                 err == ((char*)-1) ? "no further error message" : err);
         send_err(mc->c->fdout, ERR404, "env:Sender", errbuf_all);


-------------------------------------------------------------------------
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