Kaynağa Gözat

Rename senfile_adapter to MHD_send_sendfile_ and remove duplicate prototype.

ng0 6 yıl önce
ebeveyn
işleme
b98ad354ca

+ 1 - 1
src/microhttpd/connection.c

@@ -3123,7 +3123,7 @@ MHD_connection_handle_write (struct MHD_Connection *connection)
 #if defined(_MHD_HAVE_SENDFILE)
           if (MHD_resp_sender_sendfile == connection->resp_sender)
             {
-              ret = sendfile_adapter (connection);
+              ret = MHD_send_sendfile_ (connection);
             }
           else
 #else  /* ! _MHD_HAVE_SENDFILE */

+ 1 - 2
src/microhttpd/mhd_send.c

@@ -435,9 +435,8 @@ static int freebsd_sendfile_flags_thd_p_c_;
  * @param connection the MHD connection structure
  * @return actual number of bytes sent
  */
-// FIXME: rename...
 ssize_t
-sendfile_adapter (struct MHD_Connection *connection)
+MHD_send_sendfile_ (struct MHD_Connection *connection)
 {
   ssize_t ret;
   const int file_fd = connection->response->fd;

+ 1 - 4
src/microhttpd/mhd_send.h

@@ -89,12 +89,9 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection,
                           const char *buffer,
                           size_t buffer_size);
 
-ssize_t
-MHD_sendfile_on_connection_ (struct MHD_Connection *connection);
-
 #if defined(_MHD_HAVE_SENDFILE)
 ssize_t
-sendfile_adapter (struct MHD_Connection *connection);
+MHD_send_sendfile_ (struct MHD_Connection *connection);
 #endif
 
 #endif /* MHD_SEND_H */