1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
|
commit 7c3adc8449a4fe89920a6438206e8e2690d7f021
Author: Armin Novak <armin.novak@gmail.com>
Date: Mon Nov 17 00:21:04 2014 +0100
Fixed nonnull warning.
commit 232aa89efd13d21b2e5dca69e0aea70a03d09544
Author: Armin Novak <armin.novak@gmail.com>
Date: Mon Nov 17 00:22:33 2014 +0100
Fixed memory leak.
commit d9b889ddb7e466837e363b45ae6713c0bcf0f6db
Author: Armin Novak <armin.novak@gmail.com>
Date: Mon Nov 17 00:33:37 2014 +0100
Fixed memory leak.
commit f34ee395eb9516bd1b91e25acc0fa73a574d531d
Author: Armin Novak <armin.novak@gmail.com>
Date: Mon Nov 17 00:34:17 2014 +0100
Fixed memory leak.
commit c44f85c2b4e5455e5da1609d2b6d1a73a7ea2371
Author: Armin Novak <armin.novak@gmail.com>
Date: Mon Nov 17 00:42:05 2014 +0100
Fixed memory leak.
commit 7881ec762e6f9b51e24878f4c3ed5343a4e05509
Author: Marc-André Moreau <marcandre.moreau@gmail.com>
Date: Fri Nov 21 15:10:39 2014 -0500
server/shadow: avoid sending pointer updates when not active, fix remdesk leak
commit 547054a48b83fe81917cb3b474116225e97d340f
Author: Armin Novak <armin.novak@gmail.com>
Date: Sun Dec 7 00:23:46 2014 +0100
Fixed uninitialized value.
commit 43beef36ff1521756bc41378cfa251c843375f49
Author: Bernhard Miklautz <bernhard.miklautz@shacknet.at>
Date: Fri Dec 12 18:57:40 2014 +0100
rdtk/shadow: install libraries versioned
diff --git a/channels/remdesk/server/remdesk_main.c b/channels/remdesk/server/remdesk_main.c
index 4a7670e..072eec2 100644
--- a/channels/remdesk/server/remdesk_main.c
+++ b/channels/remdesk/server/remdesk_main.c
@@ -156,6 +156,8 @@ static int remdesk_send_ctl_version_info_pdu(RemdeskServerContext* context)
remdesk_virtual_channel_write(context, s);
+ Stream_Free(s, TRUE);
+
return 1;
}
diff --git a/client/common/cmdline.c b/client/common/cmdline.c
index f1f9640..a731c31 100644
--- a/client/common/cmdline.c
+++ b/client/common/cmdline.c
@@ -2077,11 +2077,24 @@ int freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings)
}
}
+ if (settings->LyncRdpMode)
+ {
+ settings->EncomspVirtualChannel = TRUE;
+ settings->RemdeskVirtualChannel = TRUE;
+ settings->CompressionEnabled = FALSE;
+ }
+
if (settings->RemoteAssistanceMode)
{
+ settings->EncomspVirtualChannel = TRUE;
+ settings->RemdeskVirtualChannel = TRUE;
+ }
+
+ if (settings->EncomspVirtualChannel)
freerdp_client_load_static_channel_addin(channels, settings, "encomsp", settings);
+
+ if (settings->RemdeskVirtualChannel)
freerdp_client_load_static_channel_addin(channels, settings, "remdesk", settings);
- }
for (index = 0; index < settings->StaticChannelCount; index++)
{
diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h
index a53c14d..ca358f1 100644
--- a/include/freerdp/settings.h
+++ b/include/freerdp/settings.h
@@ -599,6 +599,9 @@ typedef struct _RDPDR_PARALLEL RDPDR_PARALLEL;
#define FreeRDP_RemoteAssistancePassStub 1026
#define FreeRDP_RemoteAssistancePassword 1027
#define FreeRDP_RemoteAssistanceRCTicket 1028
+#define FreeRDP_EncomspVirtualChannel 1029
+#define FreeRDP_RemdeskVirtualChannel 1030
+#define FreeRDP_LyncRdpMode 1031
#define FreeRDP_TlsSecurity 1088
#define FreeRDP_NlaSecurity 1089
#define FreeRDP_RdpSecurity 1090
@@ -971,7 +974,10 @@ struct rdp_settings
ALIGN64 char* RemoteAssistancePassStub; /* 1026 */
ALIGN64 char* RemoteAssistancePassword; /* 1027 */
ALIGN64 char* RemoteAssistanceRCTicket; /* 1028 */
- UINT64 padding1088[1088 - 1029]; /* 1029 */
+ ALIGN64 BOOL EncomspVirtualChannel; /* 1029 */
+ ALIGN64 BOOL RemdeskVirtualChannel; /* 1030 */
+ ALIGN64 BOOL LyncRdpMode; /* 1031 */
+ UINT64 padding1088[1088 - 1032]; /* 1032 */
/**
* X.224 Connection Request/Confirm
diff --git a/rdtk/CMakeLists.txt b/rdtk/CMakeLists.txt
index 35b0052..93c5a3c 100644
--- a/rdtk/CMakeLists.txt
+++ b/rdtk/CMakeLists.txt
@@ -44,8 +44,9 @@ include(CMakePackageConfigHelpers)
set(RDTK_VERSION_MAJOR "1")
set(RDTK_VERSION_MINOR "1")
set(RDTK_VERSION_REVISION "0")
-set(RDTK_VERSION "${RDTK_VERSION_MAJOR}.${RDTK_VERSION_MINOR}")
-set(RDTK_VERSION_FULL "${RDTK_VERSION}.${RDTK_VERSION_REVISION}")
+set(RDTK_API_VERSION "${RDTK_VERSION_MAJOR}.${RDTK_VERSION_MINOR}")
+set(RDTK_VERSION "${RDTK_API_VERSION}.${RDTK_VERSION_REVISION}")
+set(RDTK_VERSION_FULL "${RDTK_VERSION}")
set(RDTK_VERSION_FULL ${RDTK_VERSION_FULL} PARENT_SCOPE)
# Default to release build type
diff --git a/rdtk/librdtk/CMakeLists.txt b/rdtk/librdtk/CMakeLists.txt
index 8a81964..950cc7d 100644
--- a/rdtk/librdtk/CMakeLists.txt
+++ b/rdtk/librdtk/CMakeLists.txt
@@ -58,6 +58,10 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
list(APPEND ${MODULE_PREFIX}_LIBS winpr)
list(APPEND ${MODULE_PREFIX}_LIBS freerdp)
+if (WITH_LIBRARY_VERSIONING)
+ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${RDTK_VERSION} SOVERSION ${RDTK_API_VERSION})
+endif()
+
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT RdTkTargets)
diff --git a/server/shadow/CMakeLists.txt b/server/shadow/CMakeLists.txt
index 78f85b0..26a5c7b 100644
--- a/server/shadow/CMakeLists.txt
+++ b/server/shadow/CMakeLists.txt
@@ -238,6 +238,10 @@ list(APPEND ${MODULE_PREFIX}_LIBS rdtk)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
+if (WITH_LIBRARY_VERSIONING)
+ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
+endif()
+
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT server)
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/shadow")
diff --git a/server/shadow/X11/x11_shadow.c b/server/shadow/X11/x11_shadow.c
index 3f1a964..d1a8591 100644
--- a/server/shadow/X11/x11_shadow.c
+++ b/server/shadow/X11/x11_shadow.c
@@ -386,7 +386,10 @@ int x11_shadow_pointer_alpha_update(x11ShadowSubsystem* subsystem)
msg->pixels = (BYTE*) malloc(msg->scanline * msg->height);
if (!msg->pixels)
+ {
+ free (msg);
return -1;
+ }
CopyMemory(msg->pixels, subsystem->cursorPixels, msg->scanline * msg->height);
msg->premultiplied = TRUE;
diff --git a/server/shadow/shadow_client.c b/server/shadow/shadow_client.c
index 63d0b9e..30ab90e 100644
--- a/server/shadow/shadow_client.c
+++ b/server/shadow/shadow_client.c
@@ -67,6 +67,12 @@ void shadow_client_context_new(freerdp_peer* peer, rdpShadowClient* client)
settings->RdpKeyFile = _strdup(settings->PrivateKeyFile);
+ if (server->ipcSocket)
+ {
+ settings->LyncRdpMode = TRUE;
+ settings->CompressionEnabled = FALSE;
+ }
+
client->inLobby = TRUE;
client->mayView = server->mayView;
client->mayInteract = server->mayInteract;
@@ -217,8 +223,12 @@ void shadow_client_refresh_rect(rdpShadowClient* client, BYTE count, RECTANGLE_1
wParam = (SHADOW_MSG_IN_REFRESH_OUTPUT*) calloc(1, sizeof(SHADOW_MSG_IN_REFRESH_OUTPUT));
- if (!wParam)
+ if (!wParam || !areas)
+ {
+ if (wParam)
+ free (wParam);
return;
+ }
wParam->numRects = (UINT32) count;
@@ -227,7 +237,10 @@ void shadow_client_refresh_rect(rdpShadowClient* client, BYTE count, RECTANGLE_1
wParam->rects = (RECTANGLE_16*) calloc(wParam->numRects, sizeof(RECTANGLE_16));
if (!wParam->rects)
+ {
+ free (wParam);
return;
+ }
}
CopyMemory(wParam->rects, areas, wParam->numRects * sizeof(RECTANGLE_16));
@@ -832,12 +845,15 @@ int shadow_client_subsystem_process_message(rdpShadowClient* client, wMessage* m
pointerPosition.xPos = msg->xPos;
pointerPosition.yPos = msg->yPos;
- if ((msg->xPos != client->pointerX) || (msg->yPos != client->pointerY))
+ if (client->activated)
{
- IFCALL(update->pointer->PointerPosition, context, &pointerPosition);
+ if ((msg->xPos != client->pointerX) || (msg->yPos != client->pointerY))
+ {
+ IFCALL(update->pointer->PointerPosition, context, &pointerPosition);
- client->pointerX = msg->xPos;
- client->pointerY = msg->yPos;
+ client->pointerX = msg->xPos;
+ client->pointerY = msg->yPos;
+ }
}
free(msg);
@@ -862,14 +878,17 @@ int shadow_client_subsystem_process_message(rdpShadowClient* client, wMessage* m
pointerCached.cacheIndex = pointerColor->cacheIndex;
- shadow_client_convert_alpha_pointer_data(msg->pixels, msg->premultiplied,
- msg->width, msg->height, pointerColor);
+ if (client->activated)
+ {
+ shadow_client_convert_alpha_pointer_data(msg->pixels, msg->premultiplied,
+ msg->width, msg->height, pointerColor);
- IFCALL(update->pointer->PointerNew, context, &pointerNew);
- IFCALL(update->pointer->PointerCached, context, &pointerCached);
+ IFCALL(update->pointer->PointerNew, context, &pointerNew);
+ IFCALL(update->pointer->PointerCached, context, &pointerCached);
- free(pointerColor->xorMaskData);
- free(pointerColor->andMaskData);
+ free(pointerColor->xorMaskData);
+ free(pointerColor->andMaskData);
+ }
free(msg->pixels);
free(msg);
diff --git a/server/shadow/shadow_encoder.c b/server/shadow/shadow_encoder.c
index 1e200ee..8d449bf 100644
--- a/server/shadow/shadow_encoder.c
+++ b/server/shadow/shadow_encoder.c
@@ -407,7 +407,10 @@ rdpShadowEncoder* shadow_encoder_new(rdpShadowClient* client)
encoder->height = server->screen->height;
if (shadow_encoder_init(encoder) < 0)
+ {
+ free (encoder);
return NULL;
+ }
return encoder;
}
diff --git a/server/shadow/shadow_subsystem.c b/server/shadow/shadow_subsystem.c
index f0ed9b8..ac4fd70 100644
--- a/server/shadow/shadow_subsystem.c
+++ b/server/shadow/shadow_subsystem.c
@@ -93,11 +93,11 @@ int shadow_subsystem_load_entry_points(RDP_SHADOW_ENTRY_POINTS* pEntryPoints, co
entry = shadow_subsystem_load_static_entry(name);
+ ZeroMemory(pEntryPoints, sizeof(RDP_SHADOW_ENTRY_POINTS));
+
if (!entry)
return -1;
- ZeroMemory(pEntryPoints, sizeof(RDP_SHADOW_ENTRY_POINTS));
-
if (entry(pEntryPoints) < 0)
return -1;
diff --git a/server/shadow/shadow_surface.c b/server/shadow/shadow_surface.c
index 9c58142..4c13662 100644
--- a/server/shadow/shadow_surface.c
+++ b/server/shadow/shadow_surface.c
@@ -44,12 +44,19 @@ rdpShadowSurface* shadow_surface_new(rdpShadowServer* server, int x, int y, int
surface->data = (BYTE*) malloc(surface->scanline * surface->height);
if (!surface->data)
+ {
+ free (surface);
return NULL;
+ }
ZeroMemory(surface->data, surface->scanline * surface->height);
if (!InitializeCriticalSectionAndSpinCount(&(surface->lock), 4000))
+ {
+ free (surface->data);
+ free (surface);
return NULL;
+ }
region16_init(&(surface->invalidRegion));
|