Changeset 214 in Main for trunk/Server


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

fix

Location:
trunk/Server
Files:
2 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
  • trunk/Server/version.c

    r212 r214  
    1414#elif defined(__linux__)
    1515    "Linux"
    16 #elif defined(__MINGW32__) || defined(_MSC_VER)
    17     "Windows"
     16#elif defined(__MINGW32__)
     17    "Windows-MinGW32"
     18#elif defined(_MSC_VER)
     19    "Windows-MSVC"
    1820#elif defined(__HAIKU__)
    1921    "Haiku"
Note: See TracChangeset for help on using the changeset viewer.