mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-05 18:41:05 +00:00
Fix Whitespace pr check issues
This commit is contained in:
parent
327049e8e9
commit
0e110c311e
3 changed files with 3 additions and 7 deletions
|
@ -163,16 +163,12 @@ void lan_adv::send_string(const std::string &str)
|
|||
addr.sin_port = htons(adv_port);
|
||||
UDPSocket socket_send(false);
|
||||
|
||||
// Full discloser, the use of inet_proto and the mreq stucture
|
||||
// were suggested by ai.
|
||||
|
||||
inet_pton(AF_INET, adv_multicast_addr, &(addr.sin_addr));
|
||||
|
||||
struct ip_mreq mreq;
|
||||
|
||||
mreq.imr_multiaddr.s_addr = inet_addr(adv_multicast_addr);
|
||||
mreq.imr_interface.s_addr = htonl(INADDR_ANY);
|
||||
|
||||
|
||||
setsockopt(socket_send.GetHandle(), IPPROTO_IP, IP_ADD_MEMBERSHIP,
|
||||
(const char *)&mreq, sizeof(mreq));
|
||||
|
@ -191,7 +187,7 @@ void lan_adv::serve(unsigned short port)
|
|||
{
|
||||
server_port = port;
|
||||
stop();
|
||||
start();
|
||||
start();
|
||||
}
|
||||
|
||||
void *lan_adv::run()
|
||||
|
|
|
@ -1120,7 +1120,7 @@ int ModApiMainMenu::l_get_lan_servers(lua_State *L)
|
|||
lua_pushstring(L, field_name.c_str());
|
||||
if (server.second[field_name].isString())
|
||||
lua_pushstring(L, server.second[field_name].asCString());
|
||||
else if (server.second[field_name].isConvertibleTo(Json::realValue))
|
||||
else if (server.second[field_name].isConvertibleTo(Json::realValue))
|
||||
lua_pushnumber(L, server.second[field_name].asDouble());
|
||||
else
|
||||
lua_pushnil(L);
|
||||
|
|
|
@ -420,7 +420,7 @@ Server::~Server()
|
|||
// Wait until the lan_adv_server thread has finished.
|
||||
// This is so that its thread destructor doesn't kill the thread
|
||||
// before it sends the 'shutdown' command to remove this server's
|
||||
// server info from the serverlist of local clients.
|
||||
// server info from the serverlist of local clients.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue