Changeset 1542

Show
Ignore:
Timestamp:
06/12/08 18:31:22 (7 months ago)
Author:
alo
Message:

--

Files:

Legend:

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

    r1541 r1542  
    112008-06-12  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
     2 
     3        * cherokee/main.c (common_server_initialization): Added a check to 
     4        ensure that the TCP port is within the limits. It fixes: 
     5        http://code.google.com/p/cherokee/issues/detail?id=43 
    26 
    37        * configure.in: Fixes an issue with the license notice. Reported 
  • cherokee/trunk/cherokee/main.c

    r1506 r1542  
    153153                cherokee_buffer_t tmp = CHEROKEE_BUF_INIT; 
    154154 
     155                /* Sanity check 
     156                 */ 
     157                if (port > 0xFFFF) { 
     158                        PRINT_ERROR ("Port %d is out of limits\n", port); 
     159                        return ret_error; 
     160                } 
     161 
     162                /* Build the configuration string 
     163                 */ 
    155164                cherokee_buffer_add_va (&tmp,  
    156165                                        "server!port = %d\n" 
     
    158167                                        BASIC_CONFIG, port, document_root); 
    159168 
     169                /* Apply it 
     170                 */ 
    160171                ret = cherokee_server_read_config_string (srv, &tmp); 
    161172                cherokee_buffer_mrproper (&tmp); 
     
    168179        } else { 
    169180                char *config; 
    170  
     181                 
     182                /* Read the configuration file 
     183                 */ 
    171184                config = (config_file) ? config_file : DEFAULT_CONFIG_FILE; 
    172185                ret = cherokee_server_read_config_file (srv, config);