Changeset 769

Show
Ignore:
Timestamp:
06/01/07 21:37:36 (2 years ago)
Author:
alo
Message:

--

Files:

Legend:

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

    r768 r769  
     12007-06-01  A.D.F  <adefacc@tin.it> 
     2 
     3        * cherokee/connection.c: 
     4        - sparse cleanups; 
     5        - cherokee_connection_linger_read(), 
     6          retry read only if tmp_buf has been completely filled 
     7          so that we spare one read during linger phase 
     8          (cherokee_connection_linger_read() is called 
     9           in thread.c -> purge_connection() too, so it should 
     10           try to read EOF if EOF has not been read yet); 
     11 
     12        * cherokee/fcgi_manager.c:       
     13        - cherokee_fcgi_manager_send_remove(), 
     14          removed redundant break (replaced by a return). 
     15 
    1162007-05-31  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
    217 
  • cherokee/trunk/cherokee/connection.c

    r767 r769  
    870870 
    871871        while (true) { 
    872                 size_t cnt_read = 0; 
     872                size_t cnt_read = 0; 
    873873 
    874874                /* Read from the socket to nowhere 
     
    887887                case ret_ok: 
    888888                        TRACE(ENTRIES, "read %u, ok\n", cnt_read); 
    889                         if (cnt_read > 0 && --retries > 0) 
     889                        if (cnt_read == tmp1->size && --retries > 0) 
    890890                                continue; 
    891891                        return ret; 
    892892                default: 
    893893                        RET_UNKNOWN(ret);                
    894                         break
    895                 } 
    896                 return ret_error; 
     894                        return ret_error
     895                } 
     896                /* NOTREACHED */ 
    897897        } 
    898898} 
     
    10321032 
    10331033        *end = '\0'; /* (1) */ 
    1034          
     1034 
    10351035        i1 = ptr; 
    1036          
     1036 
    10371037        do { 
    10381038                i2 = strchr (i1, ','); 
     
    11151115        if (end == NULL)  
    11161116                return ret_error; 
    1117          
     1117 
    11181118        ptr_len -= (ptr + ptr_len) - end; 
    11191119 
     
    11521152                return ret_error; 
    11531153        } 
    1154          
     1154 
    11551155        return ret_ok; 
    11561156} 
     
    12341234                return ret_error; 
    12351235        } 
    1236          
     1236 
    12371237        /* Build the local_directory: 
    12381238         */ 
     
    12661266                } 
    12671267        } 
    1268          
     1268 
    12691269        /* Advance the pointer 
    12701270         */ 
     
    13321332        memcpy (buf, info, info_len); 
    13331333        buf[info_len] = '\0'; 
    1334                  
     1334 
    13351335        post_len = (off_t) atol(buf); 
    13361336        if (post_len < 0) { 
     
    14241424                cherokee_buffer_drop_endding (&conn->incoming_header, post_len); 
    14251425        } 
    1426          
     1426 
    14271427        /* Copy the request and query string 
    14281428         */ 
     
    14791479         */ 
    14801480        if ((!cherokee_buffer_is_empty (&CONN_VSRV(conn)->userdir)) &&  
    1481             cherokee_connection_is_userdir (conn))  
    1482         { 
     1481            cherokee_connection_is_userdir (conn)) { 
    14831482                ret = parse_userdir (conn); 
    14841483                if (ret != ret_ok) return ret; 
     
    15781577        if ((conn->request.len > 1) && 
    15791578            (cherokee_buffer_end_char (&conn->request) != '/') && 
    1580             (cherokee_buffer_cmp_buf (&conn->request, &conn->web_directory) == ret_ok)) 
    1581         { 
     1579            (cherokee_buffer_cmp_buf (&conn->request, &conn->web_directory) == ret_ok)) { 
    15821580                cherokee_buffer_ensure_size (&conn->redirect, conn->request.len + 4); 
    15831581                cherokee_buffer_add_buffer (&conn->redirect, &conn->request); 
     
    16811679                goto unauthorized; 
    16821680        } 
    1683          
     1681 
    16841682        /* Create the validator object 
    16851683         */ 
     
    16991697        /* Check if the user is in the list 
    17001698         */ 
    1701         if (config_entry->users != NULL) 
    1702         { 
     1699        if (config_entry->users != NULL) { 
    17031700                void *foo; 
    17041701 
     
    19221919        else 
    19231920                at_end = ! HANDLER_SUPPORT_LENGTH(conn->handler); 
    1924          
     1921 
    19251922        /* Set the option bit mask 
    19261923         */ 
  • cherokee/trunk/cherokee/fcgi_manager.c

    r656 r769  
    486486        default: 
    487487                RET_UNKNOWN(ret); 
    488         } 
    489  
    490         return ret_ok; 
     488                return ret; 
     489        } 
    491490} 
    492491