From 664415406c79fb4d02edd2d43b75c28eea6fbc87 Mon Sep 17 00:00:00 2001 From: Artem Prilutskiy Date: Mon, 3 Jul 2017 15:24:20 +0300 Subject: [PATCH] Fixed typo --- DigestPlay.c | 4 ++-- RewindClient.c | 8 ++++---- RewindClient.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DigestPlay.c b/DigestPlay.c index de4142f..322aedd 100644 --- a/DigestPlay.c +++ b/DigestPlay.c @@ -208,7 +208,7 @@ int main(int argc, char* argv[]) if (result != CLIENT_ERROR_SUCCESS) { printf("Waiting limit exceeded (%i)\n", result); - TransmitRewindCloae(context); + TransmitRewindClose(context); ReleaseRewindContext(context); return EXIT_FAILURE; @@ -300,7 +300,7 @@ int main(int argc, char* argv[]) // Clean up close(handle); - TransmitRewindCloae(context); + TransmitRewindClose(context); ReleaseRewindContext(context); printf("Done\n"); diff --git a/RewindClient.c b/RewindClient.c index 868279b..94cad1e 100644 --- a/RewindClient.c +++ b/RewindClient.c @@ -226,11 +226,11 @@ int ConnectRewindClient(struct RewindContext* context, const char* location, con memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_DGRAM; #ifdef __linux__ - hints.ai_flags = AI_ADDRCONFIG; + hints.ai_flags = AI_ADDRCONFIG; hints.ai_family = AF_UNSPEC; #endif #ifdef __MACH__ - hints.ai_flags = AI_V4MAPPED; + hints.ai_flags = AI_V4MAPPED; hints.ai_family = AF_INET6; #endif @@ -336,13 +336,13 @@ int WaitForRewindSessionEnd(struct RewindContext* context, struct RewindSessionP break; case REWIND_TYPE_SESSION_POLL: - if ((response->state == 0) && + if ((response->state == 0) && (threshold2.tv_sec == 0)) { threshold2.tv_sec = now.tv_sec + interval2; threshold2.tv_usec = now.tv_usec; } - if ((response->state != 0) && + if ((response->state != 0) && (threshold2.tv_sec != 0)) { threshold2.tv_sec = 0; diff --git a/RewindClient.h b/RewindClient.h index 93b453f..5c22be9 100644 --- a/RewindClient.h +++ b/RewindClient.h @@ -52,7 +52,7 @@ int ConnectRewindClient(struct RewindContext* context, const char* location, con int WaitForRewindSessionEnd(struct RewindContext* context, struct RewindSessionPollData* request, time_t interval1, time_t interval2); #define TransmitRewindKeepAlive(context) TransmitRewindData(context, REWIND_TYPE_KEEP_ALIVE, REWIND_FLAG_NONE, context->data, context->length); -#define TransmitRewindCloae(context) TransmitRewindData(context, REWIND_TYPE_CLOSE, REWIND_FLAG_NONE, NULL, 0 ); +#define TransmitRewindClose(context) TransmitRewindData(context, REWIND_TYPE_CLOSE, REWIND_FLAG_NONE, NULL, 0 ); #ifdef __cplusplus }