neutrinordp: indentation fixes

ulab-next-nosound
speidy 9 years ago
parent a42cb4842c
commit 80b91c0a7b

@ -55,6 +55,7 @@ verifyColorMap(struct mod *mod)
return ; return ;
} }
} }
LLOGLN(0, ("The colormap is all NULL")); LLOGLN(0, ("The colormap is all NULL"));
} }
@ -116,44 +117,55 @@ lxrdp_connect(struct mod *mod)
g_snprintf(buf, 128, "The error code from connect is " g_snprintf(buf, 128, "The error code from connect is "
"PREECONNECTERROR"); "PREECONNECTERROR");
break; break;
case UNDEFINEDCONNECTERROR: case UNDEFINEDCONNECTERROR:
g_snprintf(buf, 128, "The error code from connect is " g_snprintf(buf, 128, "The error code from connect is "
"UNDEFINEDCONNECTERROR"); "UNDEFINEDCONNECTERROR");
break; break;
case POSTCONNECTERROR: case POSTCONNECTERROR:
g_snprintf(buf, 128, "The error code from connect is " g_snprintf(buf, 128, "The error code from connect is "
"POSTCONNECTERROR"); "POSTCONNECTERROR");
break; break;
case DNSERROR: case DNSERROR:
g_snprintf(buf, 128, "The DNS system generated an error"); g_snprintf(buf, 128, "The DNS system generated an error");
break; break;
case DNSNAMENOTFOUND: case DNSNAMENOTFOUND:
g_snprintf(buf, 128, "The DNS system could not find the " g_snprintf(buf, 128, "The DNS system could not find the "
"specified name"); "specified name");
break; break;
case CONNECTERROR: case CONNECTERROR:
g_snprintf(buf, 128, "A general connect error was returned"); g_snprintf(buf, 128, "A general connect error was returned");
break; break;
case MCSCONNECTINITIALERROR: case MCSCONNECTINITIALERROR:
g_snprintf(buf, 128, "The error code from connect is " g_snprintf(buf, 128, "The error code from connect is "
"MCSCONNECTINITIALERROR"); "MCSCONNECTINITIALERROR");
break; break;
case TLSCONNECTERROR: case TLSCONNECTERROR:
g_snprintf(buf, 128, "Error in TLS handshake"); g_snprintf(buf, 128, "Error in TLS handshake");
break; break;
case AUTHENTICATIONERROR: case AUTHENTICATIONERROR:
g_snprintf(buf, 128, "Authentication error check your password " g_snprintf(buf, 128, "Authentication error check your password "
"and username"); "and username");
break; break;
case INSUFFICIENTPRIVILEGESERROR: case INSUFFICIENTPRIVILEGESERROR:
g_snprintf(buf, 128, "Insufficent privileges on target server"); g_snprintf(buf, 128, "Insufficent privileges on target server");
break; break;
default: default:
g_snprintf(buf, 128, "Unhandled Errorcode from connect : %d", g_snprintf(buf, 128, "Unhandled Errorcode from connect : %d",
connectErrorCode); connectErrorCode);
break; break;
} }
} }
log_message(LOG_LEVEL_INFO, buf); log_message(LOG_LEVEL_INFO, buf);
mod->server_msg(mod, buf, 0); mod->server_msg(mod, buf, 0);
} }
@ -198,6 +210,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
switch (msg) switch (msg)
{ {
case 15: /* key down */ case 15: /* key down */
/* Before we handle the first character we synchronize /* Before we handle the first character we synchronize
capslock and numlock. */ capslock and numlock. */
/* We collect the state during the first synchronize /* We collect the state during the first synchronize
@ -208,11 +221,14 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
mod->inst->input->SynchronizeEvent(mod->inst->input, mod->keyBoardLockInfo); mod->inst->input->SynchronizeEvent(mod->inst->input, mod->keyBoardLockInfo);
mod->bool_keyBoardSynced = 1; mod->bool_keyBoardSynced = 1;
} }
mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3); mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3);
break; break;
case 16: /* key up */ case 16: /* key up */
mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3); mod->inst->input->KeyboardEvent(mod->inst->input, param4, param3);
break; break;
case 17: /* Synchronize */ case 17: /* Synchronize */
LLOGLN(11, ("Synchronized event handled : %d", param1)); LLOGLN(11, ("Synchronized event handled : %d", param1));
/* In some situations the Synchronize event come to early. /* In some situations the Synchronize event come to early.
@ -221,11 +237,14 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
Without this fix numlock and capslock can come Without this fix numlock and capslock can come
out of sync. */ out of sync. */
mod->inst->input->SynchronizeEvent(mod->inst->input, param1); mod->inst->input->SynchronizeEvent(mod->inst->input, param1);
if (!mod->bool_keyBoardSynced) if (!mod->bool_keyBoardSynced)
{ {
mod->keyBoardLockInfo = param1; mod->keyBoardLockInfo = param1;
} }
break; break;
case 100: /* mouse move */ case 100: /* mouse move */
LLOGLN(12, ("mouse move %d %d", param1, param2)); LLOGLN(12, ("mouse move %d %d", param1, param2));
x = param1; x = param1;
@ -233,6 +252,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
flags = PTR_FLAGS_MOVE; flags = PTR_FLAGS_MOVE;
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y); mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
break; break;
case 101: /* left button up */ case 101: /* left button up */
LLOGLN(12, ("left button up %d %d", param1, param2)); LLOGLN(12, ("left button up %d %d", param1, param2));
x = param1; x = param1;
@ -240,6 +260,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
flags = PTR_FLAGS_BUTTON1; flags = PTR_FLAGS_BUTTON1;
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y); mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
break; break;
case 102: /* left button down */ case 102: /* left button down */
LLOGLN(12, ("left button down %d %d", param1, param2)); LLOGLN(12, ("left button down %d %d", param1, param2));
x = param1; x = param1;
@ -247,6 +268,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
flags = PTR_FLAGS_BUTTON1 | PTR_FLAGS_DOWN; flags = PTR_FLAGS_BUTTON1 | PTR_FLAGS_DOWN;
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y); mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
break; break;
case 103: /* right button up */ case 103: /* right button up */
LLOGLN(12, ("right button up %d %d", param1, param2)); LLOGLN(12, ("right button up %d %d", param1, param2));
x = param1; x = param1;
@ -254,6 +276,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
flags = PTR_FLAGS_BUTTON2; flags = PTR_FLAGS_BUTTON2;
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y); mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
break; break;
case 104: /* right button down */ case 104: /* right button down */
LLOGLN(12, ("right button down %d %d", param1, param2)); LLOGLN(12, ("right button down %d %d", param1, param2));
x = param1; x = param1;
@ -261,6 +284,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
flags = PTR_FLAGS_BUTTON2 | PTR_FLAGS_DOWN; flags = PTR_FLAGS_BUTTON2 | PTR_FLAGS_DOWN;
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y); mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
break; break;
case 105: /* middle button up */ case 105: /* middle button up */
LLOGLN(12, ("middle button up %d %d", param1, param2)); LLOGLN(12, ("middle button up %d %d", param1, param2));
x = param1; x = param1;
@ -268,6 +292,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
flags = PTR_FLAGS_BUTTON3; flags = PTR_FLAGS_BUTTON3;
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y); mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
break; break;
case 106: /* middle button down */ case 106: /* middle button down */
LLOGLN(12, ("middle button down %d %d", param1, param2)); LLOGLN(12, ("middle button down %d %d", param1, param2));
x = param1; x = param1;
@ -275,18 +300,23 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
flags = PTR_FLAGS_BUTTON3 | PTR_FLAGS_DOWN; flags = PTR_FLAGS_BUTTON3 | PTR_FLAGS_DOWN;
mod->inst->input->MouseEvent(mod->inst->input, flags, x, y); mod->inst->input->MouseEvent(mod->inst->input, flags, x, y);
break; break;
case 107: /* wheel up */ case 107: /* wheel up */
flags = PTR_FLAGS_WHEEL | 0x0078; flags = PTR_FLAGS_WHEEL | 0x0078;
mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0); mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0);
break; break;
case 108: case 108:
break; break;
case 109: /* wheel down */ case 109: /* wheel down */
flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088; flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088;
mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0); mod->inst->input->MouseEvent(mod->inst->input, flags, 0, 0);
break; break;
case 110: case 110:
break; break;
case 200: case 200:
LLOGLN(10, ("Invalidate request sent from client")); LLOGLN(10, ("Invalidate request sent from client"));
x = (param1 >> 16) & 0xffff; x = (param1 >> 16) & 0xffff;
@ -295,6 +325,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
cy = (param2 >> 0) & 0xffff; cy = (param2 >> 0) & 0xffff;
mod->inst->SendInvalidate(mod->inst, -1, x, y, cx, cy); mod->inst->SendInvalidate(mod->inst, -1, x, y, cx, cy);
break; break;
case 0x5555: case 0x5555:
chanid = LOWORD(param1); chanid = LOWORD(param1);
flags = HIWORD(param1); flags = HIWORD(param1);
@ -303,6 +334,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
total_size = (int)param4; total_size = (int)param4;
LLOGLN(12, ("lxrdp_event: client to server ,chanid= %d flags= %d", chanid, flags)); LLOGLN(12, ("lxrdp_event: client to server ,chanid= %d flags= %d", chanid, flags));
if ((chanid < 0) || (chanid >= mod->inst->settings->num_channels)) if ((chanid < 0) || (chanid >= mod->inst->settings->num_channels))
{ {
LLOGLN(0, ("lxrdp_event: error chanid %d", chanid)); LLOGLN(0, ("lxrdp_event: error chanid %d", chanid));
@ -316,6 +348,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
case 3: case 3:
mod->inst->SendChannelData(mod->inst, lchid, (tui8 *)data, total_size); mod->inst->SendChannelData(mod->inst, lchid, (tui8 *)data, total_size);
break; break;
case 2: case 2:
/* end */ /* end */
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size); g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
@ -327,6 +360,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
mod->chan_buf_bytes = 0; mod->chan_buf_bytes = 0;
mod->chan_buf_valid = 0; mod->chan_buf_valid = 0;
break; break;
case 1: case 1:
/* start */ /* start */
g_free(mod->chan_buf); g_free(mod->chan_buf);
@ -336,6 +370,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size); g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
mod->chan_buf_valid += size; mod->chan_buf_valid += size;
break; break;
default: default:
/* middle */ /* middle */
g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size); g_memcpy(mod->chan_buf + mod->chan_buf_valid, data, size);
@ -344,6 +379,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2,
} }
break; break;
default: default:
LLOGLN(0, ("Unhandled message type in eventhandler %d", msg)); LLOGLN(0, ("Unhandled message type in eventhandler %d", msg));
break; break;
@ -588,8 +624,10 @@ lfreerdp_bitmap_update(rdpContext *context, BITMAP_UPDATE *bitmap)
if (bd->compressed) if (bd->compressed)
{ {
LLOGLN(20, ("decompress size : %d", bd->bitmapLength)); LLOGLN(20, ("decompress size : %d", bd->bitmapLength));
if (!bitmap_decompress(bd->bitmapDataStream, (tui8 *)dst_data, bd->width, if (!bitmap_decompress(bd->bitmapDataStream, (tui8 *)dst_data, bd->width,
bd->height, bd->bitmapLength, server_bpp, server_bpp)){ bd->height, bd->bitmapLength, server_bpp, server_bpp))
{
LLOGLN(0, ("Failure to decompress the bitmap")); LLOGLN(0, ("Failure to decompress the bitmap"));
} }
} }
@ -669,6 +707,7 @@ lfreerdp_pat_blt(rdpContext *context, PATBLT_ORDER *patblt)
{ {
LLOGLN(0, ("Warning same color on both bg and fg")); LLOGLN(0, ("Warning same color on both bg and fg"));
} }
mod->server_set_mixmode(mod, 1); mod->server_set_mixmode(mod, 1);
mod->server_set_opcode(mod, patblt->bRop); mod->server_set_opcode(mod, patblt->bRop);
mod->server_set_fgcolor(mod, fgcolor); mod->server_set_fgcolor(mod, fgcolor);
@ -825,6 +864,7 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
opRight = glyph_index->opRight; opRight = glyph_index->opRight;
opBottom = glyph_index->opBottom; opBottom = glyph_index->opBottom;
#if 1 #if 1
/* workarounds for freerdp not using fOpRedundant in /* workarounds for freerdp not using fOpRedundant in
glyph.c::update_gdi_glyph_index */ glyph.c::update_gdi_glyph_index */
if (glyph_index->fOpRedundant) if (glyph_index->fOpRedundant)
@ -834,6 +874,7 @@ lfreerdp_glyph_index(rdpContext *context, GLYPH_INDEX_ORDER *glyph_index)
opRight = glyph_index->bkRight; opRight = glyph_index->bkRight;
opBottom = glyph_index->bkBottom; opBottom = glyph_index->bkBottom;
} }
#endif #endif
mod->server_draw_text(mod, glyph_index->cacheId, glyph_index->flAccel, mod->server_draw_text(mod, glyph_index->cacheId, glyph_index->flAccel,
glyph_index->fOpRedundant, glyph_index->fOpRedundant,
@ -1232,11 +1273,13 @@ lfreerdp_pointer_new(rdpContext *context,
pointer_new->colorPtrAttr.lengthAndMask)); pointer_new->colorPtrAttr.lengthAndMask));
index = pointer_new->colorPtrAttr.cacheIndex; index = pointer_new->colorPtrAttr.cacheIndex;
if (index >= 32) if (index >= 32)
{ {
LLOGLN(0, ("lfreerdp_pointer_new: pointer index too big")); LLOGLN(0, ("lfreerdp_pointer_new: pointer index too big"));
return ; return ;
} }
if (pointer_new->xorBpp == 1 && if (pointer_new->xorBpp == 1 &&
pointer_new->colorPtrAttr.width == 32 && pointer_new->colorPtrAttr.width == 32 &&
pointer_new->colorPtrAttr.height == 32) pointer_new->colorPtrAttr.height == 32)
@ -1336,6 +1379,7 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
polygon_sc->fillMode, polygon_sc->bRop2, polygon_sc->fillMode, polygon_sc->bRop2,
polygon_sc->cbData, polygon_sc->xStart, polygon_sc->cbData, polygon_sc->xStart,
polygon_sc->yStart)); polygon_sc->yStart));
if (polygon_sc->nDeltaEntries == 3) if (polygon_sc->nDeltaEntries == 3)
{ {
server_bpp = mod->inst->settings->color_depth; server_bpp = mod->inst->settings->color_depth;
@ -1349,6 +1393,7 @@ lfreerdp_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
points[i + 1].x = 0; // polygon_sc->points[i].x; points[i + 1].x = 0; // polygon_sc->points[i].x;
points[i + 1].y = 0; // polygon_sc->points[i].y; points[i + 1].y = 0; // polygon_sc->points[i].y;
} }
fgcolor = convert_color(server_bpp, client_bpp, fgcolor = convert_color(server_bpp, client_bpp,
polygon_sc->brushColor, mod->colormap); polygon_sc->brushColor, mod->colormap);
@ -1492,11 +1537,13 @@ lfreerdp_pre_connect(freerdp *instance)
PERF_DISABLE_THEMING; PERF_DISABLE_THEMING;
// | PERF_DISABLE_CURSOR_SHADOW | PERF_DISABLE_CURSORSETTINGS; // | PERF_DISABLE_CURSOR_SHADOW | PERF_DISABLE_CURSORSETTINGS;
} }
instance->settings->compression = 0; instance->settings->compression = 0;
instance->settings->ignore_certificate = 1; instance->settings->ignore_certificate = 1;
// Multi Monitor Settings // Multi Monitor Settings
instance->settings->num_monitors = mod->client_info.monitorCount; instance->settings->num_monitors = mod->client_info.monitorCount;
for (index = 0; index < mod->client_info.monitorCount; index++) for (index = 0; index < mod->client_info.monitorCount; index++)
{ {
instance->settings->monitors[index].x = mod->client_info.minfo[index].left; instance->settings->monitors[index].x = mod->client_info.minfo[index].left;
@ -1707,6 +1754,7 @@ lrail_NotifyIconCreate(rdpContext *context, WINDOW_ORDER_INFO *orderInfo,
rnso.tool_tip = freerdp_uniconv_in(uniconv, rnso.tool_tip = freerdp_uniconv_in(uniconv,
notify_icon_state->toolTip.string, notify_icon_state->toolTip.length); notify_icon_state->toolTip.string, notify_icon_state->toolTip.length);
} }
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_INFO_TIP) if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_NOTIFY_INFO_TIP)
{ {
rnso.infotip.timeout = notify_icon_state->infoTip.timeout; rnso.infotip.timeout = notify_icon_state->infoTip.timeout;

Loading…
Cancel
Save