generated from AfonsoCMSousa/CPP-Template
fix: fixed ANOTHER issue with net.cpp
This commit is contained in:
+2
-2
@@ -50,9 +50,9 @@ app_info parce_args(int argc, char *argv[]) {
|
||||
// std::cout << '[' << key << "] = " << value << "; ";
|
||||
// }
|
||||
|
||||
__processed_info.app_api_socket_path = __env_args["API_SOCKET_PATH"].c_str();
|
||||
__processed_info.app_api_socket_path = __env_args["API_SOCKET_PATH"];
|
||||
__processed_info.max_players = (u_int16_t)atoi(__env_args["MAX_PLAYERS"].c_str());
|
||||
__processed_info.app_server_out_ip = __env_args["SERVER_OUT_IP"].c_str();
|
||||
__processed_info.app_server_out_ip = __env_args["SERVER_OUT_IP"];
|
||||
|
||||
return __processed_info;
|
||||
}
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "app.hpp" // for app_info struct
|
||||
#include "file.hpp" // for parce_args
|
||||
#include "net.hpp" // for socket operations
|
||||
#include "server_structs.h"
|
||||
@@ -18,7 +19,7 @@ int main(int argc, char *argv[]) {
|
||||
try {
|
||||
Socket sock;
|
||||
// Connect to API socket path
|
||||
sock.connect_unix(app.app_api_socket_path, app.app_port_out);
|
||||
sock.connect_unix(app.app_api_socket_path.c_str(), app.app_port_out);
|
||||
|
||||
// Send a packet for test to API
|
||||
packet = sock.create_packet(app.app_id); // tracker_id = 1
|
||||
|
||||
Reference in New Issue
Block a user