Merge branch 'master' of github.com:FreeRDP/FreeRDP
This commit is contained in:
commit
7b7acf4944
@ -650,12 +650,15 @@ static void rdpsnd_process_terminate(rdpSvcPlugin* plugin)
|
||||
if (rdpsnd->device)
|
||||
IFCALL(rdpsnd->device->Free, rdpsnd->device);
|
||||
|
||||
while ((item = list_dequeue(rdpsnd->data_out_list)) != NULL)
|
||||
if (rdpsnd->data_out_list)
|
||||
{
|
||||
stream_free(item->data_out);
|
||||
free(item);
|
||||
while ((item = list_dequeue(rdpsnd->data_out_list)) != NULL)
|
||||
{
|
||||
stream_free(item->data_out);
|
||||
free(item);
|
||||
}
|
||||
list_free(rdpsnd->data_out_list);
|
||||
}
|
||||
list_free(rdpsnd->data_out_list);
|
||||
|
||||
if (rdpsnd->subsystem)
|
||||
free(rdpsnd->subsystem);
|
||||
|
@ -74,7 +74,9 @@ void wf_context_new(freerdp* instance, rdpContext* context)
|
||||
|
||||
void wf_context_free(freerdp* instance, rdpContext* context)
|
||||
{
|
||||
|
||||
if (context->cache)
|
||||
cache_free(context->cache);
|
||||
freerdp_channels_free(context->channels);
|
||||
}
|
||||
|
||||
int wf_create_console(void)
|
||||
@ -227,6 +229,8 @@ BOOL wf_pre_connect(freerdp* instance)
|
||||
|
||||
freerdp_client_parse_rdp_file(file, settings->ConnectionFile);
|
||||
freerdp_client_populate_settings_from_rdp_file(file, settings);
|
||||
|
||||
freerdp_client_rdp_file_free(file);
|
||||
}
|
||||
|
||||
settings->OsMajorType = OSMAJORTYPE_WINDOWS;
|
||||
@ -673,7 +677,6 @@ int wfreerdp_run(freerdp* instance)
|
||||
/* cleanup */
|
||||
|
||||
freerdp_channels_close(channels, instance);
|
||||
freerdp_channels_free(channels);
|
||||
freerdp_disconnect(instance);
|
||||
|
||||
return 0;
|
||||
|
@ -48,6 +48,10 @@ typedef struct _FREERDP_ADDIN FREERDP_ADDIN;
|
||||
|
||||
typedef void* (*FREERDP_LOAD_CHANNEL_ADDIN_ENTRY_FN)(LPCSTR pszName, LPSTR pszSubsystem, LPSTR pszType, DWORD dwFlags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API LPSTR freerdp_get_library_install_path();
|
||||
FREERDP_API LPSTR freerdp_get_dynamic_addin_install_path();
|
||||
|
||||
@ -57,5 +61,9 @@ FREERDP_API void* freerdp_load_dynamic_addin(LPCSTR pszFileName, LPCSTR pszPath,
|
||||
FREERDP_API void* freerdp_load_dynamic_channel_addin_entry(LPCSTR pszName, LPSTR pszSubsystem, LPSTR pszType, DWORD dwFlags);
|
||||
FREERDP_API void* freerdp_load_channel_addin_entry(LPCSTR pszName, LPSTR pszSubsystem, LPSTR pszType, DWORD dwFlags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_COMMON_ADDIN_H */
|
||||
|
||||
|
@ -32,6 +32,10 @@
|
||||
#define INLINE inline
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define __func__ __FUNCTION__
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#ifdef FREERDP_EXPORTS
|
||||
#ifdef __GNUC__
|
||||
|
8
include/freerdp/cache/bitmap.h
vendored
8
include/freerdp/cache/bitmap.h
vendored
@ -59,6 +59,10 @@ struct rdp_bitmap_cache
|
||||
rdpSettings* settings;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmap_cache, UINT32 id, UINT32 index);
|
||||
FREERDP_API void bitmap_cache_put(rdpBitmapCache* bitmap_cache, UINT32 id, UINT32 index, rdpBitmap* bitmap);
|
||||
|
||||
@ -67,4 +71,8 @@ FREERDP_API void bitmap_cache_register_callbacks(rdpUpdate* update);
|
||||
FREERDP_API rdpBitmapCache* bitmap_cache_new(rdpSettings* settings);
|
||||
FREERDP_API void bitmap_cache_free(rdpBitmapCache* bitmap_cache);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_BITMAP_V2_CACHE_H */
|
||||
|
8
include/freerdp/cache/brush.h
vendored
8
include/freerdp/cache/brush.h
vendored
@ -56,6 +56,10 @@ struct rdp_brush_cache
|
||||
rdpSettings* settings;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API void* brush_cache_get(rdpBrushCache* brush, UINT32 index, UINT32* bpp);
|
||||
FREERDP_API void brush_cache_put(rdpBrushCache* brush, UINT32 index, void* entry, UINT32 bpp);
|
||||
|
||||
@ -64,4 +68,8 @@ FREERDP_API void brush_cache_register_callbacks(rdpUpdate* update);
|
||||
FREERDP_API rdpBrushCache* brush_cache_new(rdpSettings* settings);
|
||||
FREERDP_API void brush_cache_free(rdpBrushCache* brush);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_BRUSH_CACHE_H */
|
||||
|
8
include/freerdp/cache/cache.h
vendored
8
include/freerdp/cache/cache.h
vendored
@ -48,7 +48,15 @@ struct rdp_cache
|
||||
rdpSettings* settings;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API rdpCache* cache_new(rdpSettings* settings);
|
||||
FREERDP_API void cache_free(rdpCache* cache);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_CACHE_H */
|
||||
|
8
include/freerdp/cache/glyph.h
vendored
8
include/freerdp/cache/glyph.h
vendored
@ -59,6 +59,10 @@ struct rdp_glyph_cache
|
||||
rdpSettings* settings;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API rdpGlyph* glyph_cache_get(rdpGlyphCache* glyph_cache, UINT32 id, UINT32 index);
|
||||
FREERDP_API void glyph_cache_put(rdpGlyphCache* glyph_cache, UINT32 id, UINT32 index, rdpGlyph* entry);
|
||||
|
||||
@ -70,4 +74,8 @@ FREERDP_API void glyph_cache_register_callbacks(rdpUpdate* update);
|
||||
FREERDP_API rdpGlyphCache* glyph_cache_new(rdpSettings* settings);
|
||||
FREERDP_API void glyph_cache_free(rdpGlyphCache* glyph);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_GLYPH_CACHE_H */
|
||||
|
8
include/freerdp/cache/nine_grid.h
vendored
8
include/freerdp/cache/nine_grid.h
vendored
@ -52,6 +52,10 @@ struct rdp_nine_grid_cache
|
||||
rdpSettings* settings;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API void* nine_grid_cache_get(rdpNineGridCache* nine_grid, UINT32 index);
|
||||
FREERDP_API void nine_grid_cache_put(rdpNineGridCache* nine_grid, UINT32 index, void* entry);
|
||||
|
||||
@ -60,4 +64,8 @@ FREERDP_API void nine_grid_cache_register_callbacks(rdpUpdate* update);
|
||||
FREERDP_API rdpNineGridCache* nine_grid_cache_new(rdpSettings* settings);
|
||||
FREERDP_API void nine_grid_cache_free(rdpNineGridCache* nine_grid);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_NINE_GRID_CACHE_H */
|
||||
|
8
include/freerdp/cache/offscreen.h
vendored
8
include/freerdp/cache/offscreen.h
vendored
@ -43,6 +43,10 @@ struct rdp_offscreen_cache
|
||||
rdpSettings* settings;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API rdpBitmap* offscreen_cache_get(rdpOffscreenCache* offscreen_cache, UINT32 index);
|
||||
FREERDP_API void offscreen_cache_put(rdpOffscreenCache* offscreen_cache, UINT32 index, rdpBitmap* bitmap);
|
||||
FREERDP_API void offscreen_cache_delete(rdpOffscreenCache* offscreen, UINT32 index);
|
||||
@ -52,4 +56,8 @@ FREERDP_API void offscreen_cache_register_callbacks(rdpUpdate* update);
|
||||
FREERDP_API rdpOffscreenCache* offscreen_cache_new(rdpSettings* settings);
|
||||
FREERDP_API void offscreen_cache_free(rdpOffscreenCache* offscreen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_OFFSCREEN_CACHE_H */
|
||||
|
8
include/freerdp/cache/palette.h
vendored
8
include/freerdp/cache/palette.h
vendored
@ -46,6 +46,10 @@ struct rdp_palette_cache
|
||||
rdpSettings* settings;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API void* palette_cache_get(rdpPaletteCache* palette, UINT32 index);
|
||||
FREERDP_API void palette_cache_put(rdpPaletteCache* palette, UINT32 index, void* entry);
|
||||
|
||||
@ -54,4 +58,8 @@ FREERDP_API void palette_cache_register_callbacks(rdpUpdate* update);
|
||||
FREERDP_API rdpPaletteCache* palette_cache_new(rdpSettings* settings);
|
||||
FREERDP_API void palette_cache_free(rdpPaletteCache* palette_cache);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_PALETTE_CACHE_H */
|
||||
|
8
include/freerdp/cache/pointer.h
vendored
8
include/freerdp/cache/pointer.h
vendored
@ -42,6 +42,10 @@ struct rdp_pointer_cache
|
||||
rdpSettings* settings;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, UINT32 index);
|
||||
FREERDP_API void pointer_cache_put(rdpPointerCache* pointer_cache, UINT32 index, rdpPointer* pointer);
|
||||
|
||||
@ -50,4 +54,8 @@ FREERDP_API void pointer_cache_register_callbacks(rdpUpdate* update);
|
||||
FREERDP_API rdpPointerCache* pointer_cache_new(rdpSettings* settings);
|
||||
FREERDP_API void pointer_cache_free(rdpPointerCache* pointer_cache);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_POINTER_CACHE_H */
|
||||
|
@ -24,11 +24,19 @@
|
||||
#include <freerdp/addin.h>
|
||||
#include <freerdp/channels/channels.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API void* freerdp_channels_client_find_static_entry(const char* name, const char* identifier);
|
||||
FREERDP_API void* freerdp_channels_load_static_addin_entry(LPCSTR pszName, LPSTR pszSubsystem, LPSTR pszType, DWORD dwFlags);
|
||||
|
||||
FREERDP_API FREERDP_ADDIN** freerdp_channels_list_addins(LPSTR lpName, LPSTR lpSubsystem, LPSTR lpType, DWORD dwFlags);
|
||||
FREERDP_API void freerdp_channels_addin_list_free(FREERDP_ADDIN** ppAddins);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_CHANNELS_CLIENT */
|
||||
|
||||
|
@ -23,6 +23,10 @@
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettings* settings);
|
||||
FREERDP_API int freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings);
|
||||
|
||||
@ -36,4 +40,8 @@ FREERDP_API int freerdp_client_add_device_channel(rdpSettings* settings, int cou
|
||||
FREERDP_API int freerdp_client_add_static_channel(rdpSettings* settings, int count, char** params);
|
||||
FREERDP_API int freerdp_client_add_dynamic_channel(rdpSettings* settings, int count, char** params);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_CLIENT_CMDLINE_H */
|
||||
|
@ -133,6 +133,10 @@ struct rdp_file
|
||||
|
||||
typedef struct rdp_file rdpFile;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API BOOL freerdp_client_parse_rdp_file(rdpFile* file, char* name);
|
||||
FREERDP_API BOOL freerdp_client_parse_rdp_file_buffer(rdpFile* file, BYTE* buffer, size_t size);
|
||||
FREERDP_API BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, rdpSettings* settings);
|
||||
@ -140,4 +144,8 @@ FREERDP_API BOOL freerdp_client_populate_settings_from_rdp_file(rdpFile* file, r
|
||||
FREERDP_API rdpFile* freerdp_client_rdp_file_new();
|
||||
FREERDP_API void freerdp_client_rdp_file_free(rdpFile* file);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_CLIENT_RDP_FILE_H */
|
||||
|
@ -29,6 +29,10 @@ typedef struct rdp_glyph rdpGlyph;
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Bitmap Class */
|
||||
|
||||
typedef void (*pBitmap_New)(rdpContext* context, rdpBitmap* bitmap);
|
||||
@ -166,4 +170,8 @@ FREERDP_API void graphics_register_glyph(rdpGraphics* graphics, rdpGlyph* glyph)
|
||||
FREERDP_API rdpGraphics* graphics_new(rdpContext* context);
|
||||
FREERDP_API void graphics_free(rdpGraphics* graphics);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_GRAPHICS_H */
|
||||
|
@ -74,6 +74,10 @@ struct rdp_input
|
||||
UINT32 paddingB[32 - 21]; /* 21 */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API void freerdp_input_send_synchronize_event(rdpInput* input, UINT32 flags);
|
||||
FREERDP_API void freerdp_input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
|
||||
FREERDP_API void freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, UINT32 rdp_scancode);
|
||||
@ -81,4 +85,8 @@ FREERDP_API void freerdp_input_send_unicode_keyboard_event(rdpInput* input, UINT
|
||||
FREERDP_API void freerdp_input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
|
||||
FREERDP_API void freerdp_input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_INPUT_H */
|
||||
|
@ -81,10 +81,18 @@ struct rdp_freerdp_peer
|
||||
SEC_WINNT_AUTH_IDENTITY identity;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API void freerdp_peer_context_new(freerdp_peer* client);
|
||||
FREERDP_API void freerdp_peer_context_free(freerdp_peer* client);
|
||||
|
||||
FREERDP_API freerdp_peer* freerdp_peer_new(int sockfd);
|
||||
FREERDP_API void freerdp_peer_free(freerdp_peer* client);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_PEER_H */
|
||||
|
@ -193,6 +193,10 @@ typedef struct
|
||||
void *hints;
|
||||
} primitives_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Prototypes for the externally-visible entrypoints. */
|
||||
FREERDP_API void primitives_init(void);
|
||||
FREERDP_API primitives_t *primitives_get(void);
|
||||
@ -204,4 +208,8 @@ FREERDP_API void primitives_flags_str(
|
||||
size_t len);
|
||||
FREERDP_API void primitives_deinit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !__PRIMITIVES_H_INCLUDED__ */
|
||||
|
@ -970,6 +970,10 @@ struct rdp_settings
|
||||
};
|
||||
typedef struct rdp_settings rdpSettings;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
FREERDP_API rdpSettings* freerdp_settings_new(void* instance);
|
||||
FREERDP_API void freerdp_settings_free(rdpSettings* settings);
|
||||
|
||||
@ -989,4 +993,8 @@ FREERDP_API void freerdp_dynamic_channel_collection_add(rdpSettings* settings, A
|
||||
FREERDP_API ADDIN_ARGV* freerdp_dynamic_channel_collection_find(rdpSettings* settings, const char* name);
|
||||
FREERDP_API void freerdp_dynamic_channel_collection_free(rdpSettings* settings);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREERDP_SETTINGS_H */
|
||||
|
@ -373,10 +373,7 @@ BOOL ber_read_integer(STREAM* s, UINT32* value)
|
||||
if (value == NULL)
|
||||
{
|
||||
// even if we don't care the integer value, check the announced size
|
||||
if(length < 1 || length > 8)
|
||||
return FALSE;
|
||||
stream_seek(s, length);
|
||||
return TRUE;
|
||||
return stream_skip(s, length);
|
||||
}
|
||||
|
||||
if (length == 1)
|
||||
@ -405,6 +402,7 @@ BOOL ber_read_integer(STREAM* s, UINT32* value)
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%s: should implement reading an integer with length=%d\n", __FUNCTION__, length);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -338,16 +338,22 @@ static void svc_plugin_process_terminated(rdpSvcPlugin* plugin)
|
||||
{
|
||||
svc_data_in_item* item;
|
||||
|
||||
freerdp_thread_stop(plugin->priv->thread);
|
||||
freerdp_thread_free(plugin->priv->thread);
|
||||
if (plugin->priv->thread)
|
||||
{
|
||||
freerdp_thread_stop(plugin->priv->thread);
|
||||
freerdp_thread_free(plugin->priv->thread);
|
||||
}
|
||||
|
||||
plugin->channel_entry_points.pVirtualChannelClose(plugin->priv->open_handle);
|
||||
|
||||
svc_plugin_remove(plugin);
|
||||
|
||||
while ((item = list_dequeue(plugin->priv->data_in_list)) != NULL)
|
||||
svc_data_in_item_free(item);
|
||||
list_free(plugin->priv->data_in_list);
|
||||
if (plugin->priv->data_in_list)
|
||||
{
|
||||
while ((item = list_dequeue(plugin->priv->data_in_list)) != NULL)
|
||||
svc_data_in_item_free(item);
|
||||
list_free(plugin->priv->data_in_list);
|
||||
}
|
||||
|
||||
if (plugin->priv->data_in != NULL)
|
||||
{
|
||||
|
@ -165,6 +165,8 @@ DWORD WaitForMultipleObjects(DWORD nCount, const HANDLE* lpHandles, BOOL bWaitAl
|
||||
PVOID Object;
|
||||
struct timeval timeout;
|
||||
|
||||
if (!nCount)
|
||||
return WAIT_FAILED;
|
||||
maxfd = 0;
|
||||
FD_ZERO(&fds);
|
||||
ZeroMemory(&timeout, sizeof(timeout));
|
||||
|
Loading…
Reference in New Issue
Block a user