Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16:/tmp/cvs-serv13163
Modified Files:
xrpc_client.mx
Log Message:
minor changes in error handling.
Index: xrpc_client.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc_client.mx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- xrpc_client.mx 15 May 2007 21:56:11 -0000 1.34
+++ xrpc_client.mx 15 May 2007 22:38:34 -0000 1.35
@@ -642,19 +642,14 @@
ret = connect(sock, (struct sockaddr *) &sockaddr, sizeof(sockaddr));
for (i = NR_RETRIES; i > 0 && ret < 0; i--) {
- if (ret < 0){
- GDKwarning("setup_connection: could not set up connection with
%s:%d : %s\n",
- dst, p, errno?strerror(errno):".");
- GDKwarning("setup_connection: %d tries left\n", i);
- errno = 0;
- }
- sleep(1);
+ usleep(1);
ret = connect(sock, (struct sockaddr *) &sockaddr, sizeof(sockaddr));
}
if (ret < 0) {
- GDKerror("setup_connection: failed to setup connection with %s:%d :
%s\n",
- dst, p, errno?strerror(errno):".");
+ GDKerror("setup_connection: failed to setup connection with "
+ "%s:%d\n", dst, p);
+ if(errno) GDKerror("setup_connection: %s", strerror(errno));
close(sock);
return -1;
}
@@ -746,21 +741,19 @@
}
static void
-handle_soap_fault_msg(char *errmsg)
+handle_error_msg(char *errmsg)
{
char *strptr, *strptr2;
strptr = strstr(errmsg, "<env:Value");
if(!strptr) {
- GDKerror("handle_soap_fault_msg: SOAP Fault message not "
- "well-formed: could not find \"<env:Value\".\n%s\n",
- errmsg);
+ GDKerror(errmsg);
return;
}
strptr = strchr(strptr, '>'); assert(strptr);
strptr2 = strstr(++strptr, "</env:Value>");
if( (!strptr) || (!strptr2) ) {
- GDKerror("handle_soap_fault_msg: SOAP Fault message not "
+ GDKerror("handle_error_msg: SOAP Fault message not "
"well-formed at \"<env:Value>.\n%s\n", errmsg);
return;
}
@@ -770,7 +763,7 @@
strptr = strstr(strptr2+12, "<env:Text");
if(!strptr) {
- GDKerror("handle_soap_fault_msg: SOAP Fault message not "
+ GDKerror("handle_error_msg: SOAP Fault message not "
"well-formed: could not find \"<env:Text\".\n%s\n",
errmsg);
return;
@@ -778,7 +771,7 @@
strptr = strchr(strptr, '>') + 1;
strptr2 = strstr(strptr, "</env:Text>");
if( (!strptr) || (!strptr2) ) {
- GDKerror("handle_soap_fault_msg: SOAP Fault message not "
+ GDKerror("handle_error_msg: SOAP Fault message not "
"well-formed at \"<env:Text>\".\n%s\n", errmsg);
return;
}
@@ -868,7 +861,7 @@
return NULL;
}
b->buf[b->pos] = 0;
- handle_soap_fault_msg(b->buf);
+ handle_error_msg(b->buf);
stream_close(in); stream_destroy(in);
return NULL;
}
@@ -895,7 +888,7 @@
*time_xrpcClntDeSeria = GDKusec() - *time_xrpcClntDeSeria;
return shredBAT;
} else {
- handle_soap_fault_msg(b->buf);
+ handle_error_msg(b->buf);
BBPreclaim(shredBAT);
return NULL;
}
-------------------------------------------------------------------------
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