~ubuntu-branches/ubuntu/lucid/nginx/lucid-updates

« back to all changes in this revision

Viewing changes to src/core/ngx_conf_file.c

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2008-12-01 20:11:53 UTC
  • mfrom: (4.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20081201201153-q0ap33bcphfxriy3
Tags: 0.6.34-1ubuntu1
* Merge from debian unstable, remaining changes: (LP: #303916)
  + debian/control:
    - Add Depend on lsb >= 3.2-14, which has the status_of_proc() function.
  + debian/init.d:
    - Add sourcing to '. /lib/lsb/init-functions'
    - Add the 'status' action
  + Fixed FTBFS by properly defining IOV_MAX to its Linux equivelent.
  + Added dpatch based patch system

Show diffs side-by-side

added added

removed removed

Lines of Context:
806
806
static void
807
807
ngx_conf_flush_files(ngx_cycle_t *cycle)
808
808
{
 
809
    ssize_t           n, len;
809
810
    ngx_uint_t        i;
810
811
    ngx_list_part_t  *part;
811
812
    ngx_open_file_t  *file;
826
827
            i = 0;
827
828
        }
828
829
 
829
 
        if (file[i].buffer == NULL || file[i].pos - file[i].buffer == 0) {
 
830
        len = file[i].pos - file[i].buffer;
 
831
 
 
832
        if (file[i].buffer == NULL || len == 0) {
830
833
            continue;
831
834
        }
832
835
 
833
 
        ngx_write_fd(file[i].fd, file[i].buffer, file[i].pos - file[i].buffer);
 
836
        n = ngx_write_fd(file[i].fd, file[i].buffer, len);
 
837
 
 
838
        if (n == NGX_FILE_ERROR) {
 
839
            ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
 
840
                          ngx_write_fd_n " to \"%s\" failed",
 
841
                          file[i].name.data);
 
842
 
 
843
        } else if (n != len) {
 
844
            ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
 
845
                          ngx_write_fd_n " to \"%s\" was incomplete: %z of %uz",
 
846
                          file[i].name.data, n, len);
 
847
        }
834
848
    }
835
849
}
836
850