X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=test%2Fserver.c;h=ee1ac89315b58087a5e1b8445efa74885de780e5;hb=ccbf7a87f9f40f6b385634947911c3e14ec5baab;hp=aa55c6938bfa496b23e251819383bdfbd5d96e10;hpb=ecf7c1524ce0be656351a0d03f1319e1594b4003;p=swifty.git diff --git a/test/server.c b/test/server.c index aa55c69..ee1ac89 100644 --- a/test/server.c +++ b/test/server.c @@ -31,8 +31,8 @@ int main(int argc, const char *argv[]) memset(saddr, 0, size); saddr->count = 1; - saddr->dests[0].addr = ADDR; - saddr->dests[0].port = atoi(argv[1]); + inet_aton(ADDR, &(saddr->dests[0].addr)); + saddr->dests[0].port = htons(atoi(argv[1])); if (bind(sock, (struct sockaddr *) saddr, size) < 0) { perror("Failed to bind socket");