Skip to content

Commit

Permalink
Constify a raw 40ms timer
Browse files Browse the repository at this point in the history
  • Loading branch information
metalefty committed Aug 22, 2024
1 parent 18ba7e1 commit fdeb393
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions module/rdpClientCon.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ Client connection to xrdp
#define USE_MAX_OS_BYTES 1
#define MAX_OS_BYTES (16 * 1024 * 1024)

#define MIN_MS_BETWEEN_FRAMES 40
#define MIN_MS_TO_WAIT_FOR_MORE_UPDATES 4
#define UPDATE_RETRY_TIMEOUT 200 // After this number of retries, give up and perform the capture anyway. This prevents an infinite loop.

/*
0 GXclear, 0
1 GXnor, DPon
Expand Down Expand Up @@ -2539,7 +2543,7 @@ rdpClientConScheduleDeferredUpdate(rdpPtr dev)
{
dev->sendUpdateScheduled = TRUE;
dev->sendUpdateTimer =
TimerSet(dev->sendUpdateTimer, 0, 40,
TimerSet(dev->sendUpdateTimer, 0, MIN_MS_BETWEEN_FRAMES,
rdpClientConDeferredUpdateCallback, dev);
}
}
Expand Down Expand Up @@ -2981,9 +2985,6 @@ rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)


/******************************************************************************/
#define MIN_MS_BETWEEN_FRAMES 40
#define MIN_MS_TO_WAIT_FOR_MORE_UPDATES 4
#define UPDATE_RETRY_TIMEOUT 200 // After this number of retries, give up and perform the capture anyway. This prevents an infinite loop.
static void
rdpScheduleDeferredUpdate(rdpClientCon *clientCon)
{
Expand Down

0 comments on commit fdeb393

Please sign in to comment.