Changeset 214 in Main for trunk/Server/server.c


Ignore:
Timestamp:
Oct 3, 2024, 2:49:31 AM (6 weeks ago)
Author:
Nishi
Message:

fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Server/server.c

    r213 r214  
    167167                addresses[i].sin_family = AF_INET;
    168168                addresses[i].sin_addr.s_addr = INADDR_ANY;
    169                 addresses[i].sin_port = htons(config.ports[i]);
     169                addresses[i].sin_port = htons(config.ports[i] & 0xffff);
    170170#else
    171171                addresses[i].sin6_family = AF_INET6;
    172172                addresses[i].sin6_addr = in6addr_any;
    173                 addresses[i].sin6_port = htons(config.ports[i]);
     173                addresses[i].sin6_port = htons(config.ports[i] & 0xffff);
    174174#endif
    175175                if(bind(sock, (struct sockaddr*)&addresses[i], sizeof(addresses[i])) < 0) {
     
    890890                exit_thread(0);
    891891#endif
    892         ;
     892        return 0;
    893893}
    894894
Note: See TracChangeset for help on using the changeset viewer.