Removed unnecessary debug information and return values.

This commit is contained in:
Markus Makela
2014-11-25 14:47:50 +02:00
parent 3d50d8f117
commit 5eaf963ad4
2 changed files with 2 additions and 28 deletions

View File

@ -3076,9 +3076,8 @@ static int find_last_seqno(
/**
* Flush all log files synchronously
* @return 1 if log flushing was successful, 0 in case an error occurred.
*/
int skygw_log_force_flush_all()
void skygw_log_force_flush_all(void)
{
int rval = 0, i;
logfile_t* lf;
@ -3086,26 +3085,6 @@ int skygw_log_force_flush_all()
for (i = LOGFILE_FIRST; i <= LOGFILE_LAST; i <<= 1)
{
#ifdef SS_DEBUG
char debugstr[512];
switch(i){
case LOGFILE_ERROR:
sprintf(debugstr,"ERROR");
break;
case LOGFILE_MESSAGE:
sprintf(debugstr,"MESSAGE");
break;
case LOGFILE_TRACE:
sprintf(debugstr,"TRACE");
break;
case LOGFILE_DEBUG:
sprintf(debugstr,"DEBUG");
break;
}
skygw_log_write((logfile_id_t)i,"Force flushing LOG_%s",debugstr);
#endif
bool nflushed = true;
lf = &lm->lm_logfile[(logfile_id_t)i];
acquire_lock(&lf->lf_spinlock);
@ -3118,12 +3097,7 @@ int skygw_log_force_flush_all()
nflushed = lf->lf_flushflag;
release_lock(&lf->lf_spinlock);
}
#ifdef SS_DEBUG
fprintf(stderr,"Logfile %s flushed.\n",debugstr);
#endif
}
return rval;
}