Skip to content

Commit

Permalink
Fix returned error code on PtpSend and PtpRecv when socket is not con…
Browse files Browse the repository at this point in the history
…nected yet.
  • Loading branch information
anr2me committed Jan 24, 2021
1 parent 964b8bf commit 6b110af
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Core/HLE/sceNetAdhoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3884,16 +3884,16 @@ static int sceNetAdhocPtpSend(int id, u32 dataAddr, u32 dataSizeAddr, int timeou
// Change Socket State
ptpsocket.state = ADHOC_PTP_STATE_CLOSED;

// Disconnected
return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected");
// Disconnected or Not connected?
return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected?");
}

// Invalid Arguments
return hleLogError(SCENET, ERROR_NET_ADHOC_INVALID_ARG, "invalid arg");
}

// Not connected
return hleLogError(SCENET, ERROR_NET_ADHOC_NOT_CONNECTED, "not connected");
// Disconnected
return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected");
}

// Invalid Socket
Expand Down Expand Up @@ -3998,11 +3998,11 @@ static int sceNetAdhocPtpRecv(int id, u32 dataAddr, u32 dataSizeAddr, int timeou
// Change Socket State
ptpsocket.state = ADHOC_PTP_STATE_CLOSED;

// Disconnected
return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected");
// Disconnected or Not connected?
return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected?");
}

return hleLogError(SCENET, ERROR_NET_ADHOC_NOT_CONNECTED, "not connected");
return hleLogError(SCENET, ERROR_NET_ADHOC_DISCONNECTED, "disconnected");
}

// Invalid Socket
Expand Down

0 comments on commit 6b110af

Please sign in to comment.