mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 08:06:21 +00:00
Define stanza's attributes as const char*
In most get-like funcitons libstrophe returns pointer to a string that resides in an internal structure (e.g. xmpp_stanza_t). Hence, Profanity must not change such strings. Define respective variables as 'const char*' to reduce a chance of error and conform future libstrophe's interface. This patch mostly replaces 'char *' with 'const char*', but also fixes two memory leaks after stanza_get_reason(). Add comment within stanza_get_reason() to fix conflict with different allocator types.
This commit is contained in:
@@ -508,7 +508,7 @@ sv_ev_incoming_carbon(char *barejid, char *resource, char *message, char *pgp_me
|
||||
}
|
||||
|
||||
void
|
||||
sv_ev_message_receipt(char *barejid, char *id)
|
||||
sv_ev_message_receipt(const char *const barejid, const char *const id)
|
||||
{
|
||||
ProfChatWin *chatwin = wins_get_chat(barejid);
|
||||
if (!chatwin)
|
||||
|
||||
Reference in New Issue
Block a user