CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 25

Threaded View

  1. #2
    Join Date
    Apr 2009
    Posts
    598

    Re: fwrite ERRNO 22 with big (?) size

    The arguments 2 and 3 should be exchanged. This is a common mistake, and, usually, it does not matter, but maybe it matters here.

    Instead of
    Code:
    written_bytes = fwrite((parsed_request->body), 1, (size_t)(parsed_request->content_length), request_file);
    Write
    Code:
    written_bytes = fwrite((parsed_request->body), (size_t)(parsed_request->content_length), 1, request_file);
    Check the value in parsed_request->content_length.
    Is it the size of parsed_request->body?

    N.B. Write your code between [code] and [/code]. It will be placed in a nice rectangle and spaces at the beginning of lines will be saved.

    EDIT: Excuse-me, forget what I have said.
    Last edited by olivthill2; February 2nd, 2010 at 10:00 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured