MCPcopy Index your code
hub / github.com/apache/httpd / store_array

Function store_array

modules/cache/mod_cache_disk.c:748–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746}
747
748static apr_status_t store_array(apr_file_t *fd, apr_array_header_t* arr)
749{
750 int i;
751 apr_status_t rv;
752 struct iovec iov[2];
753 apr_size_t amt;
754 const char **elts;
755
756 elts = (const char **) arr->elts;
757
758 for (i = 0; i < arr->nelts; i++) {
759 iov[0].iov_base = (char*) elts[i];
760 iov[0].iov_len = strlen(elts[i]);
761 iov[1].iov_base = CRLF;
762 iov[1].iov_len = sizeof(CRLF) - 1;
763
764 rv = apr_file_writev_full(fd, (const struct iovec *) &iov, 2, &amt);
765 if (rv != APR_SUCCESS) {
766 return rv;
767 }
768 }
769
770 iov[0].iov_base = CRLF;
771 iov[0].iov_len = sizeof(CRLF) - 1;
772
773 return apr_file_writev_full(fd, (const struct iovec *) &iov, 1, &amt);
774}
775
776static apr_status_t read_table(cache_handle_t *handle, request_rec *r,
777 apr_table_t *table, apr_file_t *file)

Callers 1

write_headersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected