Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16:/tmp/cvs-serv2671/runtime
Modified Files:
xrpc_server.mx
Log Message:
made error message (even) more vebose to simplify debugging
Index: xrpc_server.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc_server.mx,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- xrpc_server.mx 9 May 2007 05:36:19 -0000 1.42
+++ xrpc_server.mx 9 May 2007 08:31:40 -0000 1.43
@@ -354,9 +354,33 @@
{
if (!isAllowed(xrpc_trusted, location)) {
char * msg = "Called module not allowed:";
- size_t len = strlen(msg) + strlen(location) + 5;
- char * err = alloca(len); assert(err);
- snprintf(err, len, "%s '%s'.", msg, location);
+ size_t len = strlen(msg) + strlen(location) + 11;
+ size_t len_x = 0, pos = 0;
+ char * err;
+ BUN p,q;
+ BATloop(xrpc_trusted, p, q) {
+ char* prefix = BUNhead(xrpc_trusted, p);
+ len_x += strlen(prefix) + 4;
+ }
+ err = alloca(len + len_x);
+ if (err) {
+ len += len_x;
+ } else {
+ len_x = 0;
+ err = alloca(len);
+ }
+ assert(err);
+ pos += snprintf(err+pos, len-pos, "%s", msg);
+ if (!len_x) {
+ pos += snprintf(err+pos, len-pos, " '%s'.", location);
+ } else {
+ pos += snprintf(err+pos, len-pos, "\n'%s' not in", location);
+ BATloop(xrpc_trusted, p, q) {
+ char* prefix = BUNhead(xrpc_trusted, p);
+ pos += snprintf(err+pos, len-pos, "\n'%s',", prefix);
+ }
+ err[pos-1] = '.';
+ }
send_err(out, 1, ERR403, "env:Sender", err);
return 0;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins