diff options
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -135,10 +135,10 @@ int main(int argc, char *argv[]) close(sockfd); // child doesn't need the listener - // make a struct for the message, number is thennubmer of stations + // make a struct for the message, number is the number of stations struct Welcome welcome; welcome.replyType = 2; - welcome.numStations = argc - 2; + welcome.numStations = htons(argc - 2); if ((b = send(new_fd, &welcome, sizeof(struct Welcome), 0)) == -1) perror("send"); close(new_fd); |