no logic changes, remove warnings and coding style changes

ulab-next
Jay Sorg 12 years ago
parent 099a421c77
commit 856783ba95

@ -87,34 +87,41 @@ lxrdp_connect(struct mod* mod)
switch (connectErrorCode)
{
case PREECONNECTERROR:
snprintf(buf, 128, "The error code from connect is PREECONNECTERROR");
snprintf(buf, 128, "The error code from connect is "
"PREECONNECTERROR");
break;
case UNDEFINEDCONNECTERROR:
snprintf(buf, 128, "The error code from connect is UNDEFINEDCONNECTERROR");
snprintf(buf, 128, "The error code from connect is "
"UNDEFINEDCONNECTERROR");
break;
case POSTCONNECTERROR:
snprintf(buf, 128, "The error code from connect is POSTCONNECTERROR");
snprintf(buf, 128, "The error code from connect is "
"POSTCONNECTERROR");
break;
case DNSERROR:
snprintf(buf, 128, "The DNS system generated an error");
break;
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;
case CONNECTERROR:
snprintf(buf, 128, "A general connect error was returned");
break;
case MCSCONNECTINITIALERROR:
snprintf(buf, 128, "The error code from connect is MCSCONNECTINITIALERROR");
snprintf(buf, 128, "The error code from connect is "
"MCSCONNECTINITIALERROR");
break;
case TLSCONNECTERROR:
snprintf(buf, 128, "Error in TLS handshake");
break;
case AUTHENTICATIONERROR:
snprintf(buf, 128, "Authentication error check your password and username");
snprintf(buf, 128, "Authentication error check your password "
"and username");
break;
default:
snprintf(buf, 128, "Unhandled Errorcode from connect : %d", connectErrorCode);
snprintf(buf, 128, "Unhandled Errorcode from connect : %d",
connectErrorCode);
break;
}
}
@ -767,12 +774,12 @@ lfreerdp_upsidedown(uint8* destination, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_o
tui8* dst;
int line_bytes;
int j;
if (destination == NULL)
{
LLOGLN(0, ("lfreerdp_upsidedown: destination pointer is NULL !!!"));
return;
}
line_bytes = server_Bpp * cache_bitmap_v2_order->bitmapWidth;
src = cache_bitmap_v2_order->bitmapDataStream;
dst = destination + ((cache_bitmap_v2_order->bitmapHeight) * line_bytes);
@ -847,7 +854,6 @@ lfreerdp_cache_bitmapV2(rdpContext* context,
/* Uncompressed bitmaps are upside down */
lfreerdp_upsidedown(dst_data, cache_bitmap_v2_order, server_Bpp);
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,
width, height, mod->colormap);

@ -529,14 +529,14 @@ nil_signal_handler(int sig)
static int APP_CC
get_display_num_from_display(char* display_text)
{
int index = 0;
int mode = 0;
int host_index = 0;
int disp_index = 0;
int scre_index = 0;
char host[256] = "";
char disp[256] = "";
char scre[256] = "";
int index;
int mode;
int host_index;
int disp_index;
int scre_index;
char host[256];
char disp[256];
char scre[256];
g_memset(host, 0, 256);
g_memset(disp, 0, 256);
@ -649,16 +649,20 @@ main(int argc, char** argv)
error = log_start(cfg_file,"XRDP-Chansrv");
if (error != LOG_STARTUP_OK)
{
char buf[256] ;
switch (error)
{
case LOG_ERROR_MALLOC:
g_printf("error on malloc. cannot start logging. quitting.\n");
g_writeln("error on malloc. cannot start logging. quitting.");
break;
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;
}
g_deinit();
g_exit(1);
}
log_message(LOG_LEVEL_ALWAYS,"main: app started pid %d(0x%8.8x)", pid, pid);

@ -30,6 +30,7 @@
#include "os_calls.h"
#include "chansrv.h"
#include "log.h"
#include "clipboard.h"
static Atom g_clipboard_atom = 0;
static Atom g_clip_property_atom = 0;
@ -101,10 +102,12 @@ static Time APP_CC
clipboard_get_server_time(void)
{
XEvent xevent;
unsigned char no_text[4];
/* append nothing */
no_text[0] = 0;
XChangeProperty(g_display, g_wnd, g_get_time_atom, XA_STRING, 8,
PropModeAppend, "", 0);
PropModeAppend, no_text, 0);
/* wait for PropertyNotify */
do
{
@ -280,7 +283,6 @@ clipboard_send_data_request(void)
struct stream* s;
int size;
int rv;
int num_chars;
log_message(LOG_LEVEL_DEBUG,"clipboard_send_data_request:");
if (!g_got_format_announce)
@ -492,8 +494,6 @@ static int APP_CC
clipboard_process_format_announce(struct stream* s, int clip_msg_status,
int clip_msg_len)
{
Window owner;
log_message(LOG_LEVEL_DEBUG,"clipboard_process_format_announce: CLIPRDR_FORMAT_ANNOUNCE");
//g_hexdump(s->p, s->end - s->p);
clipboard_send_format_ack();
@ -532,13 +532,11 @@ static int APP_CC
clipboard_process_data_response(struct stream* s, int clip_msg_status,
int clip_msg_len)
{
XEvent xev;
XSelectionRequestEvent* lxev;
twchar* wtext;
twchar wchr;
int len;
int index;
int wtext_size;
int data_in_len;
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)
{
int time_diff;
char buf[256];
print_got_here();
@ -315,7 +314,6 @@ sound_init(void)
{
char port[256];
int error;
pthread_t thread;
print_got_here();
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)))
{
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");

@ -172,4 +172,3 @@ thread_scp_start(int skt)
return 1;
}

@ -859,8 +859,8 @@ lib_mod_connect(struct vnc* v)
if ((v->server_bpp != 8) && (v->server_bpp != 15) &&
(v->server_bpp != 16) && (v->server_bpp != 24))
{
v->server_msg(v, "VNC error - only supporting 8, 15, 16 and 24 bpp rdp \
connections", 0);
v->server_msg(v, "VNC error - only supporting 8, 15, 16 and 24 bpp rdp "
"connections", 0);
return 1;
}
if (g_strcmp(v->ip, "") == 0)

Loading…
Cancel
Save