Changeset 1927

Show
Ignore:
Timestamp:
09/01/08 12:51:30 (3 months ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/ChangeLog

    r1924 r1927  
    112008-09-01  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * cherokee/main.c (figure_pid_file_path): Fixes the functionality, 
     4        it was not working properly because and incorrect string 
     5        comparison. 
    26 
    37        * cherokee/main_worker.c, cherokee/handler_cgi_base.c, 
  • cherokee/trunk/cherokee/main.c

    r1918 r1927  
    6565{ 
    6666        FILE *f; 
     67        char *p; 
    6768        char *line; 
    6869        char  tmp[512]; 
     
    7576                line = fgets (tmp, sizeof(tmp), f); 
    7677                if ((line != NULL) && 
    77                     (! strcmp (line, "server!pid_file = "))) 
     78                    (! strncmp (line, "server!pid_file = ", 18))) 
    7879                { 
    7980                        fclose(f); 
     81                        p = line + 18; 
     82                        while (*p) { 
     83                                if ((*p == '\r') || 
     84                                    (*p == '\n')) 
     85                                { 
     86                                        *p = '\0'; 
     87                                        break; 
     88                                } 
     89                                p += 1; 
     90                        } 
    8091                        return strdup(line + 18); 
    8192                }