rtsp_client: use g_usleep()

usleep() is not portable.
This commit is contained in:
Max Kellermann 2011-08-31 08:28:51 +02:00
parent 9209ccfa40
commit dd0798a317
1 changed files with 1 additions and 3 deletions

View File

@ -190,8 +190,6 @@ get_sockaddr_by_host(const char *host, short destport,
return true;
}
#define SLEEP_MSEC(val) usleep(val*1000)
/*
* create tcp connection
* as long as the socket is not non-blocking, this can block the process
@ -201,7 +199,7 @@ static bool
get_tcp_connect(int sd, struct sockaddr_in dest_addr, GError **error_r)
{
if (connect(sd, (struct sockaddr *)&dest_addr, sizeof(struct sockaddr))){
SLEEP_MSEC(100L);
g_usleep(100000);
// try one more time
if (connect(sd, (struct sockaddr *)&dest_addr, sizeof(struct sockaddr))) {
g_set_error(error_r, rtsp_client_quark(), errno,