| 602 | } |
| 603 | |
| 604 | int dobuf(struct clientparam * param, unsigned char * buf, const unsigned char *s, const unsigned char * doublec){ |
| 605 | struct tm* tm; |
| 606 | int i; |
| 607 | char * format; |
| 608 | time_t t; |
| 609 | |
| 610 | time(&t); |
| 611 | if(!param) return 0; |
| 612 | if(param->trafcountfunc)(*param->trafcountfunc)(param); |
| 613 | format = (char *)param->srv->logformat; |
| 614 | if(!format) format = "G%y%m%d%H%M%S.%. %p %E %U %C:%c %R:%r %O %I %h %T"; |
| 615 | tm = (*format == 'G' || *format == 'g')? |
| 616 | gmtime(&t) : localtime(&t); |
| 617 | i = dobuf2(param, buf, s, doublec, tm, format + 1); |
| 618 | clearstat(param); |
| 619 | return i; |
| 620 | } |
| 621 | |
| 622 | void lognone(struct clientparam * param, const unsigned char *s) { |
| 623 | if(param->trafcountfunc)(*param->trafcountfunc)(param); |