Skip to content

Commit

Permalink
handled null name issues
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemoralis committed Jan 22, 2025
1 parent a0704de commit b43cdfb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/core/libraries/network/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
LOG_DEBUG(Lib_Net, "name = {} flags= {}", std::string(name), flags);
if (name == nullptr) {
LOG_DEBUG(Lib_Net, "name = no-name flags= {}", flags);
} else {
LOG_DEBUG(Lib_Net, "name = {} flags= {}", std::string(name), flags);
}
auto* net_epoll = Common::Singleton<NetEpollInternal>::Instance();
auto epoll = std::make_shared<NetEpoll>();
auto id = ++net_epoll->next_epool_sock_id;
Expand Down Expand Up @@ -1180,8 +1184,13 @@ int PS4_SYSV_ABI sceNetShutdown() {
}

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,
type, protocol);
if (name == nullptr) {
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;
switch (type) {
case ORBIS_NET_SOCK_STREAM:
Expand Down

0 comments on commit b43cdfb

Please sign in to comment.