mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-14 17:50:19 +00:00
build: fix GTK/OpenSSL warnings + tab color OOB
This commit is contained in:
@@ -55,6 +55,7 @@ remove_tree (const char *path)
|
||||
g_rmdir (path);
|
||||
}
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
static gboolean
|
||||
path_tree_has_entries (const char *path)
|
||||
{
|
||||
@@ -86,6 +87,7 @@ path_tree_has_entries (const char *path)
|
||||
g_dir_close (dir);
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
gtk3_css_dir_parse_minor (const char *name, gint *minor)
|
||||
|
||||
@@ -694,17 +694,29 @@ conn_fail:
|
||||
} else
|
||||
{
|
||||
SSL_SESSION *session = SSL_get_session (serv->ssl);
|
||||
if (session && SSL_SESSION_get_time (session) + SSLTMOUT < time (NULL))
|
||||
if (session)
|
||||
{
|
||||
g_snprintf (buf, sizeof (buf), "SSL handshake timed out");
|
||||
EMIT_SIGNAL (XP_TE_CONNFAIL, serv->server_session, buf, NULL,
|
||||
time_t session_time = 0;
|
||||
gboolean handshake_timed_out = FALSE;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x30400000L
|
||||
session_time = (time_t) SSL_SESSION_get_time_ex (session);
|
||||
#else
|
||||
session_time = SSL_SESSION_get_time (session);
|
||||
#endif
|
||||
handshake_timed_out = session_time + SSLTMOUT < time (NULL);
|
||||
if (handshake_timed_out)
|
||||
{
|
||||
g_snprintf (buf, sizeof (buf), "SSL handshake timed out");
|
||||
EMIT_SIGNAL (XP_TE_CONNFAIL, serv->server_session, buf, NULL,
|
||||
NULL, NULL, 0);
|
||||
server_cleanup (serv); /* ->connecting = FALSE */
|
||||
server_cleanup (serv); /* ->connecting = FALSE */
|
||||
|
||||
if (prefs.hex_net_auto_reconnectonfail)
|
||||
auto_reconnect (serv, FALSE, -1);
|
||||
if (prefs.hex_net_auto_reconnectonfail)
|
||||
auto_reconnect (serv, FALSE, -1);
|
||||
|
||||
return (0); /* remove it (0) */
|
||||
return (0); /* remove it (0) */
|
||||
}
|
||||
}
|
||||
|
||||
return (1); /* call it more (1) */
|
||||
|
||||
@@ -408,7 +408,7 @@ mg_attr_list_create (const XTextColor *col, int size)
|
||||
static void
|
||||
mg_create_tab_colors (void)
|
||||
{
|
||||
XTextColor gui_palette[XTEXT_COLS];
|
||||
XTextColor gui_palette[THEME_TOKEN_COUNT];
|
||||
|
||||
if (plain_list)
|
||||
{
|
||||
|
||||
@@ -184,7 +184,7 @@ settings_restore_icon_search_path (void)
|
||||
if (!icon_theme || !theme_gtk3_settings_state.icon_search_path_captured)
|
||||
return;
|
||||
|
||||
gtk_icon_theme_set_search_path (icon_theme, (const char * const *) theme_gtk3_settings_state.icon_search_path, theme_gtk3_settings_state.icon_search_path_count);
|
||||
gtk_icon_theme_set_search_path (icon_theme, (const char **) theme_gtk3_settings_state.icon_search_path, theme_gtk3_settings_state.icon_search_path_count);
|
||||
gtk_icon_theme_rescan_if_needed (icon_theme);
|
||||
g_strfreev (theme_gtk3_settings_state.icon_search_path);
|
||||
theme_gtk3_settings_state.icon_search_path = NULL;
|
||||
|
||||
Reference in New Issue
Block a user