Skip to content

Commit

Permalink
Move prefix from SMS to SHM.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nexarian committed Mar 14, 2021
1 parent 78fd111 commit dc8f6a4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions module/rdpCapture.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ rdpCapture0(rdpClientCon *clientCon, RegionPtr in_reg, BoxPtr *out_rects,

LLOGLN(10, ("rdpCapture0:"));

if (clientCon->shmemstatus == SMS_UNINITIALIZED || clientCon->shmemstatus == SMS_RESIZING) {
if (clientCon->shmemstatus == SHM_UNINITIALIZED || clientCon->shmemstatus == SHM_RESIZING) {
LLOGLN(0, ("rdpCapture0: WARNING -- Shared memory is not configured. Aborting capture!"));
return FALSE;
}
Expand Down Expand Up @@ -697,7 +697,7 @@ rdpCapture1(rdpClientCon *clientCon, RegionPtr in_reg, BoxPtr *out_rects,

LLOGLN(10, ("rdpCapture1:"));

if (clientCon->shmemstatus == SMS_UNINITIALIZED || clientCon->shmemstatus == SMS_RESIZING) {
if (clientCon->shmemstatus == SHM_UNINITIALIZED || clientCon->shmemstatus == SHM_RESIZING) {
LLOGLN(0, ("rdpCapture1: WARNING -- Shared memory is not configured. Aborting capture!"));
return FALSE;
}
Expand Down Expand Up @@ -834,7 +834,7 @@ rdpCapture2(rdpClientCon *clientCon, RegionPtr in_reg, BoxPtr *out_rects,

LLOGLN(10, ("rdpCapture2:"));

if (clientCon->shmemstatus != SMS_RFX_ACTIVE) {
if (clientCon->shmemstatus != SHM_RFX_ACTIVE) {
LLOGLN(0, ("rdpCapture2: WARNING -- Shared memory is not configured for RFX. Aborting capture!"));
return FALSE;
}
Expand Down Expand Up @@ -953,7 +953,7 @@ rdpCapture3(rdpClientCon *clientCon, RegionPtr in_reg, BoxPtr *out_rects,

LLOGLN(10, ("rdpCapture3:"));

if (clientCon->shmemstatus == SMS_UNINITIALIZED || clientCon->shmemstatus == SMS_RESIZING) {
if (clientCon->shmemstatus == SHM_UNINITIALIZED || clientCon->shmemstatus == SHM_RESIZING) {
LLOGLN(0, ("rdpCapture3: WARNING -- Shared memory is not configured. Aborting capture!"));
return FALSE;
}
Expand Down
14 changes: 7 additions & 7 deletions module/rdpClientCon.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ rdpClientConGotConnection(ScreenPtr pScreen, rdpPtr dev)

LLOGLN(0, ("rdpClientConGotConnection:"));
clientCon = g_new0(rdpClientCon, 1);
clientCon->shmemstatus = SMS_UNINITIALIZED;
clientCon->shmemstatus = SHM_UNINITIALIZED;
clientCon->dev = dev;
dev->last_event_time_ms = GetTimeInMillis();
dev->do_dirty_ons = 1;
Expand Down Expand Up @@ -691,7 +691,7 @@ rdpClientConProcessScreenSizeMsg(rdpPtr dev, rdpClientCon *clientCon,

LLOGLN(0, ("rdpClientConProcessScreenSizeMsg: set width %d height %d "
"bpp %d", width, height, bpp));
clientCon->shmemstatus = SMS_RESIZING;
clientCon->shmemstatus = SHM_RESIZING;
clientCon->rdp_width = width;
clientCon->rdp_height = height;
clientCon->rdp_bpp = bpp;
Expand Down Expand Up @@ -830,7 +830,7 @@ rdpClientConProcessMsgClientInfo(rdpPtr dev, rdpClientCon *clientCon)
int i1;
int index;
BoxRec box;
enum shared_memory_status shmemstatus = SMS_ACTIVE;
enum shared_memory_status shmemstatus = SHM_ACTIVE;

LLOGLN(0, ("rdpClientConProcessMsgClientInfo:"));
s = clientCon->in_s;
Expand Down Expand Up @@ -871,7 +871,7 @@ rdpClientConProcessMsgClientInfo(rdpPtr dev, rdpClientCon *clientCon)
"bytes %d", clientCon->shmemid, clientCon->shmemptr, bytes));
clientCon->shmem_lineBytes = clientCon->rdp_Bpp * clientCon->cap_width;
clientCon->cap_stride_bytes = clientCon->cap_width * 4;
shmemstatus = SMS_RFX_ACTIVE;
shmemstatus = SHM_RFX_ACTIVE;
}
else if (clientCon->client_info.capture_code == 3) /* H264 */
{
Expand All @@ -892,7 +892,7 @@ rdpClientConProcessMsgClientInfo(rdpPtr dev, rdpClientCon *clientCon)
"bytes %d", clientCon->shmemid, clientCon->shmemptr, bytes));
clientCon->shmem_lineBytes = clientCon->rdp_Bpp * clientCon->cap_width;
clientCon->cap_stride_bytes = clientCon->cap_width * 4;
shmemstatus = SMS_H264_ACTIVE;
shmemstatus = SHM_H264_ACTIVE;
}

if (clientCon->client_info.capture_format != 0)
Expand Down Expand Up @@ -1012,7 +1012,7 @@ rdpClientConProcessMsgClientInfo(rdpPtr dev, rdpClientCon *clientCon)
rdpInputKeyboardEvent(dev, 18, (long)(&(clientCon->client_info)),
0, 0, 0);

if (clientCon->shmemstatus == SMS_UNINITIALIZED || clientCon->shmemstatus == SMS_RESIZING) {
if (clientCon->shmemstatus == SHM_UNINITIALIZED || clientCon->shmemstatus == SHM_RESIZING) {
clientCon->shmemstatus = shmemstatus;
}

Expand Down Expand Up @@ -2454,7 +2454,7 @@ rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
LLOGLN(10, ("rdpDeferredUpdateCallback: suppress_output set"));
return 0;
}
if (clientCon->shmemstatus == SMS_UNINITIALIZED || clientCon->shmemstatus == SMS_RESIZING) {
if (clientCon->shmemstatus == SHM_UNINITIALIZED || clientCon->shmemstatus == SHM_RESIZING) {
LLOGLN(10, ("rdpDeferredUpdateCallback: clientCon->shmemstatus "
"is not valid for capture operations: %d"
" reschedule rect_id %d rect_id_ack %d",
Expand Down
10 changes: 5 additions & 5 deletions module/rdpClientCon.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ struct rdpup_os_bitmap
};

enum shared_memory_status {
SMS_UNINITIALIZED = 0,
SMS_RESIZING,
SMS_ACTIVE,
SMS_RFX_ACTIVE,
SMS_H264_ACTIVE
SHM_UNINITIALIZED = 0,
SHM_RESIZING,
SHM_ACTIVE,
SHM_RFX_ACTIVE,
SHM_H264_ACTIVE
};

/* one of these for each client */
Expand Down

0 comments on commit dc8f6a4

Please sign in to comment.