mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Merge branch 'master' into osx-functional
This commit is contained in:
commit
c1de017f38
@ -380,7 +380,11 @@ _chat_log_chat(const char * const login, const char * const other,
|
||||
g_hash_table_replace(logs, strdup(other), dated_log);
|
||||
}
|
||||
|
||||
if (timestamp == NULL) timestamp = g_date_time_new_now_local();
|
||||
if (timestamp == NULL) {
|
||||
timestamp = g_date_time_new_now_local();
|
||||
} else {
|
||||
g_date_time_ref(timestamp);
|
||||
}
|
||||
|
||||
gchar *date_fmt = g_date_time_format(timestamp, "%H:%M:%S");
|
||||
FILE *logp = fopen(dated_log->filename, "a");
|
||||
@ -407,6 +411,7 @@ _chat_log_chat(const char * const login, const char * const other,
|
||||
}
|
||||
|
||||
g_free(date_fmt);
|
||||
g_date_time_unref(timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -317,6 +317,8 @@ p_gpg_verify(const char * const barejid, const char *const sign)
|
||||
|
||||
gpgme_data_release(sign_data);
|
||||
gpgme_data_release(plain_data);
|
||||
gpgme_release(ctx);
|
||||
free(sign_with_header_footer);
|
||||
}
|
||||
|
||||
char*
|
||||
|
@ -892,6 +892,8 @@ _version_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
|
||||
log_warning("From attribute specified different JID, using original JID.");
|
||||
}
|
||||
|
||||
xmpp_ctx_t *ctx = xmpp_conn_get_context(conn);
|
||||
|
||||
Jid *jidp = jid_create((char*)userdata);
|
||||
const char *presence = NULL;
|
||||
if (muc_active(jidp->barejid)) {
|
||||
@ -902,6 +904,9 @@ _version_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
|
||||
Resource *resource = p_contact_get_resource(contact, jidp->resourcepart);
|
||||
if (!resource) {
|
||||
ui_handle_software_version_error(jidp->fulljid, "Unknown resource");
|
||||
if (name_str) xmpp_free(ctx, name_str);
|
||||
if (version_str) xmpp_free(ctx, version_str);
|
||||
if (os_str) xmpp_free(ctx, os_str);
|
||||
return 0;
|
||||
}
|
||||
presence = string_from_resource_presence(resource->presence);
|
||||
@ -912,6 +917,10 @@ _version_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
|
||||
jid_destroy(jidp);
|
||||
free(userdata);
|
||||
|
||||
if (name_str) xmpp_free(ctx, name_str);
|
||||
if (version_str) xmpp_free(ctx, version_str);
|
||||
if (os_str) xmpp_free(ctx, os_str);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user