Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
394f7218
Unverified
Commit
394f7218
authored
Dec 08, 2022
by
Bert Melis
Committed by
GitHub
Dec 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix set/getSocketOption inheritance (#7480)
parent
05e55d87
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
13 deletions
+5
-13
libraries/WiFi/src/WiFiClient.h
libraries/WiFi/src/WiFiClient.h
+1
-1
libraries/WiFiClientSecure/src/WiFiClientSecure.cpp
libraries/WiFiClientSecure/src/WiFiClientSecure.cpp
+3
-10
libraries/WiFiClientSecure/src/WiFiClientSecure.h
libraries/WiFiClientSecure/src/WiFiClientSecure.h
+1
-2
No files found.
libraries/WiFi/src/WiFiClient.h
View file @
394f7218
...
...
@@ -84,7 +84,7 @@ public:
return
!
this
->
operator
==
(
rhs
);
};
int
fd
()
const
;
virtual
int
fd
()
const
;
int
setSocketOption
(
int
option
,
char
*
value
,
size_t
len
);
int
setSocketOption
(
int
level
,
int
option
,
const
void
*
value
,
size_t
len
);
...
...
libraries/WiFiClientSecure/src/WiFiClientSecure.cpp
View file @
394f7218
...
...
@@ -376,16 +376,9 @@ int WiFiClientSecure::setTimeout(uint32_t seconds)
return
0
;
}
}
int
WiFiClientSecure
::
setSocketOption
(
int
option
,
char
*
value
,
size_t
len
)
{
return
setSocketOption
(
SOL_SOCKET
,
option
,
(
const
void
*
)
value
,
len
);
}
int
WiFiClientSecure
::
setSocketOption
(
int
level
,
int
option
,
const
void
*
value
,
size_t
len
)
int
WiFiClientSecure
::
fd
()
const
{
int
res
=
setsockopt
(
sslclient
->
socket
,
level
,
option
,
value
,
len
);
if
(
res
<
0
)
{
log_e
(
"fail on %d, errno: %d,
\"
%s
\"
"
,
sslclient
->
socket
,
errno
,
strerror
(
errno
));
}
return
res
;
return
sslclient
->
socket
;
}
libraries/WiFiClientSecure/src/WiFiClientSecure.h
View file @
394f7218
...
...
@@ -80,8 +80,7 @@ public:
const
mbedtls_x509_crt
*
getPeerCertificate
()
{
return
mbedtls_ssl_get_peer_cert
(
&
sslclient
->
ssl_ctx
);
};
bool
getFingerprintSHA256
(
uint8_t
sha256_result
[
32
])
{
return
get_peer_fingerprint
(
sslclient
,
sha256_result
);
};
int
setTimeout
(
uint32_t
seconds
);
int
setSocketOption
(
int
option
,
char
*
value
,
size_t
len
);
int
setSocketOption
(
int
level
,
int
option
,
const
void
*
value
,
size_t
len
);
int
fd
()
const
;
operator
bool
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment