diff options
author | Max Kellermann <max@duempel.org> | 2011-08-31 08:28:51 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-08-31 08:30:26 +0200 |
commit | dd0798a317545c0dc3242e8982050f4ea36b11e5 (patch) | |
tree | 3a10e294ac82a729bfeb5bc858bcce23c5f76d95 /src/rtsp_client.c | |
parent | 9209ccfa40e47f1fd8571c4463777b0e468dfb65 (diff) | |
download | mpd-dd0798a317545c0dc3242e8982050f4ea36b11e5.tar.gz mpd-dd0798a317545c0dc3242e8982050f4ea36b11e5.tar.xz mpd-dd0798a317545c0dc3242e8982050f4ea36b11e5.zip |
rtsp_client: use g_usleep()
usleep() is not portable.
Diffstat (limited to 'src/rtsp_client.c')
-rw-r--r-- | src/rtsp_client.c | 4 |
1 files changed, 1 insertions, 3 deletions
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, |