{
#define OPEP "geseml.c:eml_doneqfile,"
-SIDTYP **sids;
TRATYP **next;
-sids=(SIDTYP **)0;
next=(TRATYP **)0;
if (list!=(TRATYP **)0) {
TRATYP **ptr;
ptr=list;
while (*ptr!=(TRATYP *)0) {
- SIDTYP *found;
-
- found=eml_addsid(&sids,(*ptr)->sessid);
- switch ((*ptr)->code) {
- case 'C' : //completed
- break;
- default :
- next=(TRATYP **)rou_addlist((void **)next,(void *)eml_duptra(*ptr));
- found->count++;
- break;
- }
- ptr++;
- }
- }
-if (sids!=(SIDTYP **)0) {
- SIDTYP **ptr;
-
- ptr=sids;
- while (*ptr!=(SIDTYP *)0) {
- if ((*ptr)->count==0) {
+ if (((*ptr)->code=='C')&&(eml_countqfile((*ptr)->sessid,-1)==0)) {
(void) rou_alert(0,"%s JMPDBG need to remove <%s>",OPEP,(*ptr)->sessid);
(void) eml_deleteqfile((*ptr)->sessid);
}
+ else
+ next=(TRATYP **)rou_addlist((void **)next,(void *)eml_duptra(*ptr));
ptr++;
}
- sids=eml_freesid(sids);
}
if (next!=(TRATYP **)0) {
FILE *qfile;
- uuid_t id;
+ time_t current;
char qname[150];
- char struuid[40];
int phase;
_Bool proceed;
qfile=(FILE *)0;
- (void) uuid_generate(id);
- (void) uuid_unparse(id,struuid);
- (void) snprintf(qname,sizeof(qname),"%s-%s-%04d",struuid,"redo",0);
+ (void) time(¤t);
+ (void) snprintf(qname,sizeof(qname),"%08ld-%08d-%04d",current,getpid(),0);
phase=0;
proceed=true;
while (proceed==true) {
case 1 : //opening count file
char name[300];
- (void) snprintf(name,sizeof(name),"%s.%s/%s",filename,qfilename,EXTCNT);
- if ((fcount=fopen(name,"rw"))==(FILE *)0) {
+ (void) snprintf(name,sizeof(name),"%s/%s.%s",filename,qfilename,EXTCNT);
+ if ((fcount=fopen(name,"r+"))==(FILE *)0) {
(void) rou_alert(0,"%s unable to open count file <%s> (error=<%s>)",
OPEP,name,strerror(errno));
phase=999; //Big trouble