Move ParseURI out of sopc_sockets_event_mgr.c
Description
The function static bool ParseURI(const char* uri, char** hostname, char** port)
is the only one to use SOPC_Helper_URI_ParseTcpUaUri
.
It would be interesting to test it as well.
ParseURI
is a more useful helper than SOPC_Helper_URI_ParseTcpUaUri
, and a more suitable fuzzer target.
Moreover, it contains numerical constants and intermediate returns.
Fixes
- Move
ParseURI
tosopc_helper_uri
and rename itSOPC_Helper_URI_SplitTcpUaUri
, - Remove constants,
- Remove intermediate returns,
- Change
fuzzer_parse_tcp_uri
to use it.