handled null name issues

This commit is contained in:
georgemoralis 2025-01-20 22:55:58 +02:00
parent 4cf5c0dc8b
commit ab689aa334

View File

@ -631,7 +631,11 @@ int PS4_SYSV_ABI sceNetEpollControl(OrbisNetId eid, int op, OrbisNetId id,
} }
int PS4_SYSV_ABI sceNetEpollCreate(const char* name, int flags) { int PS4_SYSV_ABI sceNetEpollCreate(const char* name, int flags) {
if (name == nullptr) {
LOG_DEBUG(Lib_Net, "name = no-name flags= {}", flags);
} else {
LOG_DEBUG(Lib_Net, "name = {} flags= {}", std::string(name), flags); LOG_DEBUG(Lib_Net, "name = {} flags= {}", std::string(name), flags);
}
auto* net_epoll = Common::Singleton<NetEpollInternal>::Instance(); auto* net_epoll = Common::Singleton<NetEpollInternal>::Instance();
auto epoll = std::make_shared<NetEpoll>(); auto epoll = std::make_shared<NetEpoll>();
auto id = ++net_epoll->next_epool_sock_id; auto id = ++net_epoll->next_epool_sock_id;
@ -1180,8 +1184,13 @@ int PS4_SYSV_ABI sceNetShutdown() {
} }
OrbisNetId PS4_SYSV_ABI sceNetSocket(const char* name, int family, int type, int protocol) { OrbisNetId PS4_SYSV_ABI sceNetSocket(const char* name, int family, int type, int protocol) {
LOG_INFO(Lib_Net, "name = {} family = {} type = {} protocol = {}", std::string(name), family, if (name == nullptr) {
type, protocol); LOG_INFO(Lib_Net, "name = no-named family = {} type = {} protocol = {}", family, type,
protocol);
} else {
LOG_INFO(Lib_Net, "name = {} family = {} type = {} protocol = {}", std::string(name),
family, type, protocol);
}
SocketPtr sock; SocketPtr sock;
switch (type) { switch (type) {
case ORBIS_NET_SOCK_STREAM: case ORBIS_NET_SOCK_STREAM: