View Issue Details

IDProjectCategoryView StatusLast Update
0001659libmicrohttpddocumentationpublic2011-02-15 12:19
Reporterwellska Assigned ToChristian Grothoff  
PrioritynormalSeveritytextReproducibilityalways
Status closedResolutionfixed 
Summary0001659: code examples switch parameter ordering for MHD_create_response_from_fd*
DescriptionThe size and fd parameters are switched in the tutorial document, but are correct in the reference manual. I have attached an appropriate patch swapping those parameters in the tutorial.
TagsNo tags attached.
Attached Files
doc_changes.patch (1,124 bytes)   
Index: doc/chapters/responseheaders.inc
===================================================================
--- doc/chapters/responseheaders.inc	(revision 14385)
+++ doc/chapters/responseheaders.inc	(working copy)
@@ -113,7 +113,7 @@
     }
 
   response =
-    MHD_create_response_from_fd_at_offset (fd, sbuf.st_size, 0);
+    MHD_create_response_from_fd_at_offset (sbuf.st_size, fd, 0);
   MHD_add_response_header (response, "Content-Type", MIMETYPE);
   ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
   MHD_destroy_response (response);
Index: doc/examples/responseheaders.c
===================================================================
--- doc/examples/responseheaders.c	(revision 14385)
+++ doc/examples/responseheaders.c	(working copy)
@@ -47,7 +47,7 @@
         return MHD_NO;
     }
   response =
-    MHD_create_response_from_fd_at_offset (fd, sbuf.st_size, 0);
+    MHD_create_response_from_fd_at_offset (sbuf.st_size, fd, 0);
   MHD_add_response_header (response, "Content-Type", MIMETYPE);
   ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
   MHD_destroy_response (response);
doc_changes.patch (1,124 bytes)   

Activities

Christian Grothoff

2011-02-11 10:16

manager   ~0004255

Fixed in SVN 14390. Thanks!

Issue History

Date Modified Username Field Change
2011-02-10 22:07 wellska New Issue
2011-02-10 22:07 wellska File Added: doc_changes.patch
2011-02-11 10:16 Christian Grothoff Note Added: 0004255
2011-02-11 10:16 Christian Grothoff Status new => resolved
2011-02-11 10:16 Christian Grothoff Resolution open => fixed
2011-02-11 10:16 Christian Grothoff Assigned To => Christian Grothoff
2011-02-15 12:19 Christian Grothoff Status resolved => closed