no logic changes, remove warnings and coding style changes
This commit is contained in:
parent
099a421c77
commit
856783ba95
@ -87,34 +87,41 @@ lxrdp_connect(struct mod* mod)
|
|||||||
switch (connectErrorCode)
|
switch (connectErrorCode)
|
||||||
{
|
{
|
||||||
case PREECONNECTERROR:
|
case PREECONNECTERROR:
|
||||||
snprintf(buf, 128, "The error code from connect is PREECONNECTERROR");
|
snprintf(buf, 128, "The error code from connect is "
|
||||||
|
"PREECONNECTERROR");
|
||||||
break;
|
break;
|
||||||
case UNDEFINEDCONNECTERROR:
|
case UNDEFINEDCONNECTERROR:
|
||||||
snprintf(buf, 128, "The error code from connect is UNDEFINEDCONNECTERROR");
|
snprintf(buf, 128, "The error code from connect is "
|
||||||
|
"UNDEFINEDCONNECTERROR");
|
||||||
break;
|
break;
|
||||||
case POSTCONNECTERROR:
|
case POSTCONNECTERROR:
|
||||||
snprintf(buf, 128, "The error code from connect is POSTCONNECTERROR");
|
snprintf(buf, 128, "The error code from connect is "
|
||||||
|
"POSTCONNECTERROR");
|
||||||
break;
|
break;
|
||||||
case DNSERROR:
|
case DNSERROR:
|
||||||
snprintf(buf, 128, "The DNS system generated an error");
|
snprintf(buf, 128, "The DNS system generated an error");
|
||||||
break;
|
break;
|
||||||
case DNSNAMENOTFOUND:
|
case DNSNAMENOTFOUND:
|
||||||
snprintf(buf, 128, "The DNS system could not find the specified name");
|
snprintf(buf, 128, "The DNS system could not find the "
|
||||||
|
"specified name");
|
||||||
break;
|
break;
|
||||||
case CONNECTERROR:
|
case CONNECTERROR:
|
||||||
snprintf(buf, 128, "A general connect error was returned");
|
snprintf(buf, 128, "A general connect error was returned");
|
||||||
break;
|
break;
|
||||||
case MCSCONNECTINITIALERROR:
|
case MCSCONNECTINITIALERROR:
|
||||||
snprintf(buf, 128, "The error code from connect is MCSCONNECTINITIALERROR");
|
snprintf(buf, 128, "The error code from connect is "
|
||||||
|
"MCSCONNECTINITIALERROR");
|
||||||
break;
|
break;
|
||||||
case TLSCONNECTERROR:
|
case TLSCONNECTERROR:
|
||||||
snprintf(buf, 128, "Error in TLS handshake");
|
snprintf(buf, 128, "Error in TLS handshake");
|
||||||
break;
|
break;
|
||||||
case AUTHENTICATIONERROR:
|
case AUTHENTICATIONERROR:
|
||||||
snprintf(buf, 128, "Authentication error check your password and username");
|
snprintf(buf, 128, "Authentication error check your password "
|
||||||
|
"and username");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
snprintf(buf, 128, "Unhandled Errorcode from connect : %d", connectErrorCode);
|
snprintf(buf, 128, "Unhandled Errorcode from connect : %d",
|
||||||
|
connectErrorCode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -767,12 +774,12 @@ lfreerdp_upsidedown(uint8* destination, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_o
|
|||||||
tui8* dst;
|
tui8* dst;
|
||||||
int line_bytes;
|
int line_bytes;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
if (destination == NULL)
|
if (destination == NULL)
|
||||||
{
|
{
|
||||||
LLOGLN(0, ("lfreerdp_upsidedown: destination pointer is NULL !!!"));
|
LLOGLN(0, ("lfreerdp_upsidedown: destination pointer is NULL !!!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
line_bytes = server_Bpp * cache_bitmap_v2_order->bitmapWidth;
|
line_bytes = server_Bpp * cache_bitmap_v2_order->bitmapWidth;
|
||||||
src = cache_bitmap_v2_order->bitmapDataStream;
|
src = cache_bitmap_v2_order->bitmapDataStream;
|
||||||
dst = destination + ((cache_bitmap_v2_order->bitmapHeight) * line_bytes);
|
dst = destination + ((cache_bitmap_v2_order->bitmapHeight) * line_bytes);
|
||||||
@ -847,7 +854,6 @@ lfreerdp_cache_bitmapV2(rdpContext* context,
|
|||||||
/* Uncompressed bitmaps are upside down */
|
/* Uncompressed bitmaps are upside down */
|
||||||
lfreerdp_upsidedown(dst_data, cache_bitmap_v2_order, server_Bpp);
|
lfreerdp_upsidedown(dst_data, cache_bitmap_v2_order, server_Bpp);
|
||||||
LLOGLN(10, ("lfreerdp_cache_bitmapV2: upside down progressed"));
|
LLOGLN(10, ("lfreerdp_cache_bitmapV2: upside down progressed"));
|
||||||
/* old: g_memcpy(dst_data, cache_bitmap_v2_order->bitmapDataStream,width * height * server_Bpp);*/
|
|
||||||
}
|
}
|
||||||
dst_data1 = convert_bitmap(server_bpp, client_bpp, dst_data,
|
dst_data1 = convert_bitmap(server_bpp, client_bpp, dst_data,
|
||||||
width, height, mod->colormap);
|
width, height, mod->colormap);
|
||||||
|
@ -529,14 +529,14 @@ nil_signal_handler(int sig)
|
|||||||
static int APP_CC
|
static int APP_CC
|
||||||
get_display_num_from_display(char* display_text)
|
get_display_num_from_display(char* display_text)
|
||||||
{
|
{
|
||||||
int index = 0;
|
int index;
|
||||||
int mode = 0;
|
int mode;
|
||||||
int host_index = 0;
|
int host_index;
|
||||||
int disp_index = 0;
|
int disp_index;
|
||||||
int scre_index = 0;
|
int scre_index;
|
||||||
char host[256] = "";
|
char host[256];
|
||||||
char disp[256] = "";
|
char disp[256];
|
||||||
char scre[256] = "";
|
char scre[256];
|
||||||
|
|
||||||
g_memset(host, 0, 256);
|
g_memset(host, 0, 256);
|
||||||
g_memset(disp, 0, 256);
|
g_memset(disp, 0, 256);
|
||||||
@ -649,16 +649,20 @@ main(int argc, char** argv)
|
|||||||
error = log_start(cfg_file,"XRDP-Chansrv");
|
error = log_start(cfg_file,"XRDP-Chansrv");
|
||||||
if (error != LOG_STARTUP_OK)
|
if (error != LOG_STARTUP_OK)
|
||||||
{
|
{
|
||||||
char buf[256] ;
|
|
||||||
switch (error)
|
switch (error)
|
||||||
{
|
{
|
||||||
case LOG_ERROR_MALLOC:
|
case LOG_ERROR_MALLOC:
|
||||||
g_printf("error on malloc. cannot start logging. quitting.\n");
|
g_writeln("error on malloc. cannot start logging. quitting.");
|
||||||
break;
|
break;
|
||||||
case LOG_ERROR_FILE_OPEN:
|
case LOG_ERROR_FILE_OPEN:
|
||||||
g_printf("error opening log file [%s]. quitting.\n", getLogFile(buf,255));
|
g_writeln("error opening log file [%s]. quitting.",
|
||||||
|
getLogFile(text, 255));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
g_writeln("log_start error");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
g_deinit();
|
||||||
g_exit(1);
|
g_exit(1);
|
||||||
}
|
}
|
||||||
log_message(LOG_LEVEL_ALWAYS,"main: app started pid %d(0x%8.8x)", pid, pid);
|
log_message(LOG_LEVEL_ALWAYS,"main: app started pid %d(0x%8.8x)", pid, pid);
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "os_calls.h"
|
#include "os_calls.h"
|
||||||
#include "chansrv.h"
|
#include "chansrv.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "clipboard.h"
|
||||||
|
|
||||||
static Atom g_clipboard_atom = 0;
|
static Atom g_clipboard_atom = 0;
|
||||||
static Atom g_clip_property_atom = 0;
|
static Atom g_clip_property_atom = 0;
|
||||||
@ -101,10 +102,12 @@ static Time APP_CC
|
|||||||
clipboard_get_server_time(void)
|
clipboard_get_server_time(void)
|
||||||
{
|
{
|
||||||
XEvent xevent;
|
XEvent xevent;
|
||||||
|
unsigned char no_text[4];
|
||||||
|
|
||||||
/* append nothing */
|
/* append nothing */
|
||||||
|
no_text[0] = 0;
|
||||||
XChangeProperty(g_display, g_wnd, g_get_time_atom, XA_STRING, 8,
|
XChangeProperty(g_display, g_wnd, g_get_time_atom, XA_STRING, 8,
|
||||||
PropModeAppend, "", 0);
|
PropModeAppend, no_text, 0);
|
||||||
/* wait for PropertyNotify */
|
/* wait for PropertyNotify */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -280,7 +283,6 @@ clipboard_send_data_request(void)
|
|||||||
struct stream* s;
|
struct stream* s;
|
||||||
int size;
|
int size;
|
||||||
int rv;
|
int rv;
|
||||||
int num_chars;
|
|
||||||
|
|
||||||
log_message(LOG_LEVEL_DEBUG,"clipboard_send_data_request:");
|
log_message(LOG_LEVEL_DEBUG,"clipboard_send_data_request:");
|
||||||
if (!g_got_format_announce)
|
if (!g_got_format_announce)
|
||||||
@ -492,8 +494,6 @@ static int APP_CC
|
|||||||
clipboard_process_format_announce(struct stream* s, int clip_msg_status,
|
clipboard_process_format_announce(struct stream* s, int clip_msg_status,
|
||||||
int clip_msg_len)
|
int clip_msg_len)
|
||||||
{
|
{
|
||||||
Window owner;
|
|
||||||
|
|
||||||
log_message(LOG_LEVEL_DEBUG,"clipboard_process_format_announce: CLIPRDR_FORMAT_ANNOUNCE");
|
log_message(LOG_LEVEL_DEBUG,"clipboard_process_format_announce: CLIPRDR_FORMAT_ANNOUNCE");
|
||||||
//g_hexdump(s->p, s->end - s->p);
|
//g_hexdump(s->p, s->end - s->p);
|
||||||
clipboard_send_format_ack();
|
clipboard_send_format_ack();
|
||||||
@ -532,13 +532,11 @@ static int APP_CC
|
|||||||
clipboard_process_data_response(struct stream* s, int clip_msg_status,
|
clipboard_process_data_response(struct stream* s, int clip_msg_status,
|
||||||
int clip_msg_len)
|
int clip_msg_len)
|
||||||
{
|
{
|
||||||
XEvent xev;
|
|
||||||
XSelectionRequestEvent* lxev;
|
XSelectionRequestEvent* lxev;
|
||||||
twchar* wtext;
|
twchar* wtext;
|
||||||
twchar wchr;
|
twchar wchr;
|
||||||
int len;
|
int len;
|
||||||
int index;
|
int index;
|
||||||
int wtext_size;
|
|
||||||
int data_in_len;
|
int data_in_len;
|
||||||
|
|
||||||
log_message(LOG_LEVEL_DEBUG,"clipboard_process_data_response: CLIPRDR_DATA_RESPONSE");
|
log_message(LOG_LEVEL_DEBUG,"clipboard_process_data_response: CLIPRDR_DATA_RESPONSE");
|
||||||
|
@ -207,7 +207,6 @@ static int APP_CC
|
|||||||
sound_process_training(struct stream* s, int size)
|
sound_process_training(struct stream* s, int size)
|
||||||
{
|
{
|
||||||
int time_diff;
|
int time_diff;
|
||||||
char buf[256];
|
|
||||||
|
|
||||||
print_got_here();
|
print_got_here();
|
||||||
|
|
||||||
@ -315,7 +314,6 @@ sound_init(void)
|
|||||||
{
|
{
|
||||||
char port[256];
|
char port[256];
|
||||||
int error;
|
int error;
|
||||||
pthread_t thread;
|
|
||||||
|
|
||||||
print_got_here();
|
print_got_here();
|
||||||
LOG(0, ("sound_init:"));
|
LOG(0, ("sound_init:"));
|
||||||
|
@ -56,7 +56,9 @@ scp_v1_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s)
|
|||||||
|
|
||||||
while ((!data) && ((retries == 0) || (current_try > 0)))
|
while ((!data) && ((retries == 0) || (current_try > 0)))
|
||||||
{
|
{
|
||||||
LOG_DBG("data %d - retry %d - currenttry %d - expr %d", data, retries, current_try, ((!data) && ((retries==0) || (current_try>0))));
|
LOG_DBG("data %d - retry %d - currenttry %d - expr %d",
|
||||||
|
data, retries, current_try,
|
||||||
|
((!data) && ((retries == 0) || (current_try > 0))));
|
||||||
|
|
||||||
e = scp_v1s_request_password(c, s, "Wrong username and/or password");
|
e = scp_v1s_request_password(c, s, "Wrong username and/or password");
|
||||||
|
|
||||||
|
@ -172,4 +172,3 @@ thread_scp_start(int skt)
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -859,8 +859,8 @@ lib_mod_connect(struct vnc* v)
|
|||||||
if ((v->server_bpp != 8) && (v->server_bpp != 15) &&
|
if ((v->server_bpp != 8) && (v->server_bpp != 15) &&
|
||||||
(v->server_bpp != 16) && (v->server_bpp != 24))
|
(v->server_bpp != 16) && (v->server_bpp != 24))
|
||||||
{
|
{
|
||||||
v->server_msg(v, "VNC error - only supporting 8, 15, 16 and 24 bpp rdp \
|
v->server_msg(v, "VNC error - only supporting 8, 15, 16 and 24 bpp rdp "
|
||||||
connections", 0);
|
"connections", 0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (g_strcmp(v->ip, "") == 0)
|
if (g_strcmp(v->ip, "") == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user