Move to 0.7.0 client init.
This commit is contained in:
parent
34f2347316
commit
578f676b2f
@ -35,7 +35,7 @@
|
|||||||
# ***** END LICENSE BLOCK *****
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
AC_INIT(src/daemon.c)
|
AC_INIT(src/daemon.c)
|
||||||
AM_INIT_AUTOMAKE(guacd, 0.6.2)
|
AM_INIT_AUTOMAKE(guacd, 0.7.0)
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
@ -70,6 +70,7 @@ void guacd_handle_connection(int fd) {
|
|||||||
guac_client_plugin* plugin;
|
guac_client_plugin* plugin;
|
||||||
guac_instruction* select;
|
guac_instruction* select;
|
||||||
guac_instruction* connect;
|
guac_instruction* connect;
|
||||||
|
int init_result;
|
||||||
|
|
||||||
/* Open guac_socket */
|
/* Open guac_socket */
|
||||||
guac_socket* socket = guac_socket_open(fd);
|
guac_socket* socket = guac_socket_open(fd);
|
||||||
@ -144,14 +145,22 @@ void guacd_handle_connection(int fd) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load and init client */
|
/* Get client */
|
||||||
client = guac_client_plugin_get_client(plugin, socket,
|
client = guac_client_alloc();
|
||||||
connect->argc, connect->argv,
|
client->socket = socket;
|
||||||
guacd_client_log_info, guacd_client_log_error);
|
client->log_info_handler = guacd_client_log_info;
|
||||||
|
client->log_error_handler = guacd_client_log_error;
|
||||||
|
|
||||||
|
/* Init client */
|
||||||
|
init_result =
|
||||||
|
guac_client_init(client, plugin, connect->argc, connect->argv);
|
||||||
|
|
||||||
guac_instruction_free(connect);
|
guac_instruction_free(connect);
|
||||||
|
|
||||||
if (client == NULL) {
|
/* If client could not be started, free everything and fail */
|
||||||
|
if (init_result) {
|
||||||
|
|
||||||
|
guac_client_free(client);
|
||||||
|
|
||||||
guacd_log_guac_error("Error instantiating client");
|
guacd_log_guac_error("Error instantiating client");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user