mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-12 08:40:19 +00:00
build: fix GTK/OpenSSL warnings + tab color OOB
This commit is contained in:
@@ -34,7 +34,6 @@ config_h.set_quoted('PACKAGE_NAME', meson.project_name())
|
||||
config_h.set_quoted('GETTEXT_PACKAGE', 'zoitechat')
|
||||
config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'),
|
||||
get_option('datadir'), 'locale'))
|
||||
config_h.set_quoted('G_LOG_DOMAIN', 'zoitechat')
|
||||
config_h.set10('ENABLE_NLS', true)
|
||||
|
||||
# Optional features
|
||||
|
||||
@@ -16,6 +16,7 @@ fishlim_sources = [
|
||||
|
||||
shared_module('fishlim', fishlim_sources,
|
||||
dependencies: [libgio_dep, zoitechat_plugin_dep, libssl_dep],
|
||||
c_args: ['-DOPENSSL_API_COMPAT=0x10100000L'],
|
||||
install: true,
|
||||
install_dir: plugindir,
|
||||
name_prefix: '',
|
||||
|
||||
@@ -19,10 +19,6 @@ if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system =
|
||||
'shared/df.c'
|
||||
]
|
||||
|
||||
if get_option('gtk-frontend')
|
||||
sysinfo_cargs += '-DUSE_GTK_FRONTEND'
|
||||
endif
|
||||
|
||||
if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system == 'freebsd'
|
||||
libpci = dependency('libpci', required: false, method: 'pkg-config')
|
||||
if libpci.found()
|
||||
|
||||
@@ -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