Fix library name generation, fix instruction parsing.

This commit is contained in:
Michael Jumper 2011-11-26 00:28:43 -08:00
parent 7bca78c7a8
commit 61579bd9b7
2 changed files with 6 additions and 2 deletions

View File

@ -127,6 +127,10 @@ guac_client_plugin* guac_client_plugin_open(const char* protocol) {
void* obj;
} alias;
/* Add protocol and .so suffix to protocol_lib */
strcat(protocol_lib, protocol);
strcat(protocol_lib, ".so");
/* Load client plugin */
client_plugin_handle = dlopen(protocol_lib, RTLD_LAZY);
if (!client_plugin_handle) {

View File

@ -461,8 +461,8 @@ guac_instruction* guac_protocol_read_instruction(guac_socket* socket, int usec_t
}
/* Reset buffer */
memmove(socket->__instructionbuf, socket->__instructionbuf + i + 1, socket->__instructionbuf_used_length - i - 1);
socket->__instructionbuf_used_length -= i + 1;
memmove(socket->__instructionbuf, socket->__instructionbuf + i, socket->__instructionbuf_used_length - i);
socket->__instructionbuf_used_length -= i;
socket->__instructionbuf_parse_start = 0;
socket->__instructionbuf_elementc = 0;