mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
socket-ssl: Updated docs. Check for output sockfd=-1 from the cmd with socketSslConnectionSetSocketDescriptor.
This commit is contained in:
parent
41e90ef8b5
commit
3b2b3ebad4
@ -40,9 +40,9 @@ NX_INLINE Result socketInitializeDefault(void) {
|
||||
return socketInitialize(NULL);
|
||||
}
|
||||
|
||||
/// Wrapper for \ref sslConnectionSetSocketDescriptor. Returns the output sockfd on success.
|
||||
/// Wrapper for \ref sslConnectionSetSocketDescriptor. Returns the output sockfd on success and -1 on error. errno==ENOENT indicates that no sockfd was returned, this error must be ignored.
|
||||
int socketSslConnectionSetSocketDescriptor(SslConnection *c, int sockfd);
|
||||
|
||||
/// Wrapper for \ref sslConnectionGetSocketDescriptor. Returns the output sockfd on success.
|
||||
/// Wrapper for \ref sslConnectionGetSocketDescriptor. Returns the output sockfd on success and -1 on error.
|
||||
int socketSslConnectionGetSocketDescriptor(SslConnection *c);
|
||||
|
||||
|
@ -156,6 +156,11 @@ int socketSslConnectionSetSocketDescriptor(SslConnection *c, int sockfd) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (tmpfd==-1) { // The cmd didn't return a sockfd. This error must be ignored.
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
dev = FindDevice("soc:");
|
||||
if(dev == -1)
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user