mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix bug, use system utility
This commit is contained in:
parent
69cc01b696
commit
20fcfb3eee
8 changed files with 41 additions and 13 deletions
|
@ -648,7 +648,8 @@ int SrsRtspConn::connect()
|
|||
|
||||
// parse uri
|
||||
if (!req) {
|
||||
std::string schema, host, vhost, app, port, param;
|
||||
std::string schema, host, vhost, app, param;
|
||||
int port;
|
||||
srs_discovery_tc_url(rtsp_tcUrl, schema, host, vhost, app, port, param);
|
||||
|
||||
// generate output by template.
|
||||
|
@ -662,8 +663,8 @@ int SrsRtspConn::connect()
|
|||
}
|
||||
|
||||
// connect host.
|
||||
if ((ret = srs_socket_connect(req->host, ::atoi(req->port.c_str()), ST_UTIME_NO_TIMEOUT, &stfd)) != ERROR_SUCCESS) {
|
||||
srs_error("rtsp: connect server %s:%s failed. ret=%d", req->host.c_str(), req->port.c_str(), ret);
|
||||
if ((ret = srs_socket_connect(req->host, req->port, ST_UTIME_NO_TIMEOUT, &stfd)) != ERROR_SUCCESS) {
|
||||
srs_error("rtsp: connect server %s:%d failed. ret=%d", req->host.c_str(), req->port, ret);
|
||||
return ret;
|
||||
}
|
||||
io = new SrsStSocket(stfd);
|
||||
|
@ -697,7 +698,7 @@ int SrsRtspConn::connect()
|
|||
}
|
||||
|
||||
// TODO: FIXME: refine the connect_app.
|
||||
int SrsRtspConn::connect_app(string ep_server, string ep_port)
|
||||
int SrsRtspConn::connect_app(string ep_server, int ep_port)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue