]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - readlog_common.c
Initialize LDAP connection after generating the useragent log
[thirdparty/sarg.git] / readlog_common.c
index e223d01166bcdff6f19383285f8e10fae5274683..b39ee9b9a313c5f8164f25144cd31e8f3223d98f 100644 (file)
@@ -80,6 +80,7 @@ static enum ReadLogReturnCodeEnum Common_ReadEntry(char *Line,struct ReadLogStru
        int Minute;
        int Second;
        char *Ip;
+       char *User;
 
        // get IP address
        Entry->Ip=Ip=Line;
@@ -94,7 +95,7 @@ static enum ReadLogReturnCodeEnum Common_ReadEntry(char *Line,struct ReadLogStru
        }
 
        // the ID of the user or - if the user is unidentified
-       Entry->User=++Line;
+       Entry->User=User=++Line;
        for (UserLen=0 ; *Line && *Line!=' ' ; UserLen++) Line++;
        if (*Line!=' ' || UserLen==0) return(RLRC_Unknown);
 
@@ -195,7 +196,7 @@ static enum ReadLogReturnCodeEnum Common_ReadEntry(char *Line,struct ReadLogStru
        Ip[IpLen]='\0';
        Entry->HttpCode[HttpCodeLen]='\0';
        Entry->Url[UrlLen]='\0';
-       Entry->User[UserLen]='\0';
+       User[UserLen]='\0';
 
        return(RLRC_NoError);
 }