From dd0798a317545c0dc3242e8982050f4ea36b11e5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 31 Aug 2011 08:28:51 +0200 Subject: rtsp_client: use g_usleep() usleep() is not portable. --- src/rtsp_client.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/rtsp_client.c') diff --git a/src/rtsp_client.c b/src/rtsp_client.c index cf02911ca..093b44710 100644 --- a/src/rtsp_client.c +++ b/src/rtsp_client.c @@ -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, -- cgit v1.2.3