/[jscoverage]/trunk/tests/http-server-empty-header-value.c
ViewVC logotype

Diff of /trunk/tests/http-server-empty-header-value.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 609 by siliconforks, Mon May 24 03:13:28 2010 UTC revision 610 by siliconforks, Fri Sep 24 20:35:36 2010 UTC
# Line 24  Line 24 
24    
25  #include "http-server.h"  #include "http-server.h"
26    
27  int main(void) {  int main(int argc, const char ** argv) {
28  #ifdef __MINGW32__  #ifdef __MINGW32__
29    WSADATA data;    WSADATA data;
30    if (WSAStartup(MAKEWORD(1, 1), &data) != 0) {    if (WSAStartup(MAKEWORD(1, 1), &data) != 0) {
# Line 32  Line 32 
32    }    }
33  #endif  #endif
34    
35      assert(argc == 2);
36      uint16_t port = (uint16_t) atoi(argv[1]);
37    
38    SOCKET s = socket(PF_INET, SOCK_STREAM, 0);    SOCKET s = socket(PF_INET, SOCK_STREAM, 0);
39    assert(s != INVALID_SOCKET);    assert(s != INVALID_SOCKET);
40    
# Line 40  Line 43 
43    
44    struct sockaddr_in a;    struct sockaddr_in a;
45    a.sin_family = AF_INET;    a.sin_family = AF_INET;
46    a.sin_port = htons(8000);    a.sin_port = htons(port);
47    a.sin_addr.s_addr = htonl(INADDR_LOOPBACK);    a.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
48    int result = bind(s, (struct sockaddr *) &a, sizeof(a));    int result = bind(s, (struct sockaddr *) &a, sizeof(a));
49    assert(result == 0);    assert(result == 0);

Legend:
Removed from v.609  
changed lines
  Added in v.610

  ViewVC Help
Powered by ViewVC 1.1.24