1
0
Fork 0
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:
winlin 2015-10-13 17:37:59 +08:00
parent 69cc01b696
commit 20fcfb3eee
8 changed files with 41 additions and 13 deletions

View file

@ -273,8 +273,8 @@ int SrsDynamicHttpConn::connect()
}
// connect host.
if ((ret = srs_socket_connect(req->host, ::atoi(req->port.c_str()), ST_UTIME_NO_TIMEOUT, &stfd)) != ERROR_SUCCESS) {
srs_error("mpegts: 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("mpegts: connect server %s:%d failed. ret=%d", req->host.c_str(), req->port, ret);
return ret;
}
io = new SrsStSocket(stfd);
@ -308,7 +308,7 @@ int SrsDynamicHttpConn::connect()
}
// TODO: FIXME: refine the connect_app.
int SrsDynamicHttpConn::connect_app(string ep_server, string ep_port)
int SrsDynamicHttpConn::connect_app(string ep_server, int ep_port)
{
int ret = ERROR_SUCCESS;