Remove -O2, check rfbInitClient return value, provide return value in client init

This commit is contained in:
Michael Jumper
2010-09-20 18:13:32 -07:00
parent 72277b50aa
commit 79fabff39d
7 changed files with 26 additions and 12 deletions

View File

@@ -101,6 +101,8 @@ void guac_vnc_cursor(rfbClient* client, int x, int y, int w, int h, int bpp) {
guac_send_cursor(io, x, y, png_buffer, w, h);
}
void guac_vnc_update(rfbClient* client, int x, int y, int w, int h) {
int dx, dy;
@@ -264,7 +266,7 @@ void vnc_guac_client_free_handler(guac_client* client) {
}
void guac_client_init(guac_client* client, int argc, char** argv) {
int guac_client_init(guac_client* client, int argc, char** argv) {
char* hostname_copy;
@@ -299,7 +301,9 @@ void guac_client_init(guac_client* client, int argc, char** argv) {
rfb_client->serverHost = hostname_copy;
rfb_client->serverPort = atoi(argv[1]);
rfbInitClient(rfb_client, NULL, NULL);
if (!rfbInitClient(rfb_client, NULL, NULL)) {
return 1;
}
/* Allocate buffers */
png_buffer = guac_alloc_png_buffer(rfb_client->width, rfb_client->height, 3); /* No-alpha */
@@ -328,5 +332,7 @@ void guac_client_init(guac_client* client, int argc, char** argv) {
/* Send size */
guac_send_size(client->io, rfb_client->width, rfb_client->height);
return 0;
}