Update of /cvsroot/monetdb/MonetDB5/src/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21120
Modified Files:
mal.mx
Log Message:
Error subscript error. They where flags rather then indices.
Index: mal.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal.mx,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- mal.mx 29 May 2007 21:51:37 -0000 1.123
+++ mal.mx 30 May 2007 05:06:58 -0000 1.124
@@ -374,15 +374,11 @@
memory leakage problems later on.
@c
void mal_exit(void){
- int t = 0, cnt[4], reruns=0;
+ int t = 0, reruns=0;
+ int freeclient=0, finishing=0, claimed=0, awaiting=0;
str err;
Client cntxt = mal_clients;
- cnt[FREECLIENT]=0;
- cnt[FINISHING]=0;
- cnt[CLAIMED]=0;
- cnt[AWAITING]=0;
-
@-
Before continuing we should make sure that all clients
(except the console) have left the scene.
@@ -392,17 +388,21 @@
return;
}
do{
- for(cntxt= mal_clients+1; cntxt<mal_clients+MAL_MAXCLIENTS;
cntxt++)
- cnt[cntxt->mode]++;
- if( cnt[FINISHING]+cnt[CLAIMED]+cnt[AWAITING] )
+ for(cntxt= mal_clients+1; cntxt<mal_clients+MAL_MAXCLIENTS;
cntxt++){
+ freeclient += cntxt->mode & FREECLIENT;
+ finishing += cntxt->mode & FINISHING;
+ claimed += cntxt->mode & CLAIMED;
+ awaiting += cntxt->mode & FREECLIENT;
+ }
+ if( finishing+claimed+awaiting)
MT_sleep_ms(1000);
if(reruns)
stream_printf(mal_clients->fdout,"#MALexit: clients
still active\n");
- } while (cnt[FINISHING]+cnt[CLAIMED]+cnt[AWAITING] && ++reruns < 3);
+ } while (finishing+claimed+awaiting && ++reruns < 3);
if( reruns== 3)
stream_printf(mal_clients->fdout,"#MALexit: server forced exit"
" %d finishing %d claimed %d waiting\n",
- cnt[FINISHING],cnt[CLAIMED],cnt[AWAITING]);
+ finishing,claimed,awaiting);
@c
#if 0
/* skip this to solve random crashes, needs work */
-------------------------------------------------------------------------
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-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins