Changeset a9fa300 in mod_gnutls
- Timestamp:
- May 27, 2016, 12:11:32 PM (6 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, proxy-ticket, upstream
- Children:
- 19f2719
- Parents:
- 6868585
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_io.c
r6868585 ra9fa300 765 765 /** 766 766 * Pull function for GnuTLS 767 * 768 * Generic errnos used for gnutls_transport_set_errno: 769 * EIO: Unknown I/O error 770 * ECONNABORTED: Input BB does not exist (NULL) 771 * 772 * The reason we are not using APR_TO_OS_ERROR to map apr_status_t to 773 * errnos is this warning in the APR documentation: "If the statcode 774 * was not created by apr_get_os_error or APR_FROM_OS_ERROR, the 775 * results are undefined." We cannot know if this applies to any error 776 * we might encounter. 767 777 */ 768 778 ssize_t mgs_transport_read(gnutls_transport_ptr_t ptr, … … 782 792 if (!ctxt->input_bb) { 783 793 ctxt->input_rc = APR_EOF; 794 gnutls_transport_set_errno(ctxt->session, ECONNABORTED); 784 795 return -1; 785 796 } … … 813 824 apr_brigade_cleanup(ctxt->input_bb); 814 825 ctxt->input_bb = NULL; 826 gnutls_transport_set_errno(ctxt->session, EIO); 815 827 return -1; 816 828 } … … 850 862 } 851 863 864 gnutls_transport_set_errno(ctxt->session, EIO); 852 865 return -1; 853 866 } 854 867 868 /** 869 * Push function for GnuTLS 870 * 871 * In case of unexpected errors gnutls_transport_set_errno is called 872 * with EIO. The reason we are not using APR_TO_OS_ERROR to map 873 * apr_status_t to errnos is this warning in the APR documentation: 874 * "If the statcode was not created by apr_get_os_error or 875 * APR_FROM_OS_ERROR, the results are undefined." We cannot know if 876 * this applies to any error we might encounter. 877 */ 855 878 ssize_t mgs_transport_write(gnutls_transport_ptr_t ptr, 856 879 const void *buffer, size_t len) {
Note: See TracChangeset
for help on using the changeset viewer.