Changeset 769

Show
Ignore:
Timestamp:
01/06/10 19:52:19 (8 months ago)
Author:
PavelVinogradov
Message:

Partial merge of [366] from branches/1.2.x

Location:
branches/1.1.x
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • branches/1.1.x/configure

    r143 r769  
    56645664fi 
    56655665MYSQLLIBS="-L$DST_MYSQL_LIBS -lmysqlclient" 
    5666 CFLAGS="-O2 -Wall -D_BSD_SOURCE=1 -D_GNU_SOURCE=1" 
     5666CFLAGS="-O2 -Wall -D_BSD_SOURCE=1 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64" 
    56675667 
    56685668#### 
     
    57625762fi 
    57635763PCRELIBS="-L$DST_PCRE_LIBS -lpcre" 
    5764 CFLAGS="-O2 -Wall -D_BSD_SOURCE=1 -D_GNU_SOURCE=1" 
     5764#CFLAGS="-O2 -Wall -D_BSD_SOURCE=1 -D_GNU_SOURCE=1" 
    57655765 
    57665766echo "#include \"$DST_PCRE_INC/pcre.h\"" >pcre.h 
  • branches/1.1.x/configure.in

    r143 r769  
    175175fi 
    176176MYSQLLIBS="-L$DST_MYSQL_LIBS -lmysqlclient" 
    177 CFLAGS="-O2 -Wall -D_BSD_SOURCE=1 -D_GNU_SOURCE=1" 
     177CFLAGS="-O2 -Wall -D_BSD_SOURCE=1 -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64" 
    178178 
    179179#### 
     
    245245fi 
    246246PCRELIBS="-L$DST_PCRE_LIBS -lpcre" 
    247 CFLAGS="-O2 -Wall -D_BSD_SOURCE=1 -D_GNU_SOURCE=1" 
     247#CFLAGS="-O2 -Wall -D_BSD_SOURCE=1 -D_GNU_SOURCE=1" 
    248248 
    249249echo "#include \"$DST_PCRE_INC/pcre.h\"" >pcre.h 
  • branches/1.1.x/demon.c

    r564 r769  
    2020 
    2121int EMPTY; 
    22 long ENDVALUE; 
    23 long NEWENDVALUE; 
     22//long ENDVALUE; 
     23size_t ENDVALUE; 
     24size_t NEWENDVALUE; 
    2425 
    2526int RIPC; 
     
    9192 
    9293 
    93 long GetNewEndValue() 
     94size_t GetNewEndValue() 
    9495{ 
    95   long value; 
    96   FILE *finp; 
     96  struct stat st; 
    9797 
    9898  trim(&path[0]); 
    9999  sprintf(&path[0],"%s/%s",conf.logdir,conf.logfile); 
    100   if((finp=fopen( &path[0], "rb" ))==NULL) 
    101     { 
    102          printf("Don't open file %s/%s\n",conf.logdir,conf.logfile); 
    103          return(0); 
    104     } 
    105   fseek(finp,0,SEEK_END); 
    106   value=ftell(finp); 
    107   fclose(finp); 
    108   return(value); 
     100  lstat(&path[0],&st); 
     101  return(st.st_size); 
    109102} 
    110103 
     
    146139   
    147140  int userflag=0; 
    148   double ENDVALUE2; 
     141  size_t ENDVALUE2; 
    149142 
    150143  sprintf(&path[0],"%s/%s",conf.logdir,conf.logfile); 
     
    857850      if(DEBUG>0) 
    858851        { 
    859           printf("Reading file: start=%ld length=%ld\n",ENDVALUE,NEWENDVALUE); 
     852          printf("Reading file: start=%lu length=%lu\n",ENDVALUE,NEWENDVALUE); 
    860853        } 
    861854 
  • branches/1.1.x/logtool.c

    r738 r769  
    112112          return(-1); 
    113113        }   
     114//  if((int)str[10]!=0x2E && (int)str[14]!=0x20 && (int)str[21]!=0x20) 
    114115    }   
    115116  if(strlen(str)<60) 
     
    307308                }         
    308309        } 
    309   } else { 
     310  }  
     311  else  
     312  { 
    310313        /* If user ask https page, we get url like: domain.name:443 */ 
    311314        if ( pcre_exec(re, NULL, url, strlen(url), 0, 0, re_ovector, 30) >= 0 ) { 
     
    318321                        if (url[i] == ':') 
    319322                        { /* We found :<port>. Stop parse */ 
    320                                 break; 
    321323                        } else { 
    322324                                DNS.url[count]=url[i]; 
     
    334336        } 
    335337  } 
    336    
    337338  /**  ÉÝÅÍ × ÓÐÉÓËÅ ÌÏËÁÌØÎÙÈ ÈÏÓÔÏ× **/ 
    338339  /* ÐÏÌÕÞÁÅÍ ÄÏÍÅÎÎÏÅ ÉÍÑ*/