1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00
Commit Graph

27 Commits

Author SHA1 Message Date
Steffen Jaeckel
bac24601da Introduce equals_our_barejid()
Instead of always repeating the same pattern, introduce a helper function.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-12-12 18:27:02 +01:00
Steffen Jaeckel
847a86de50 add connection_get_jid()
Use a singleton `Jid` inside the connection instead of always re-creating
a `Jid` from the same string.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-12-12 18:26:21 +01:00
John Hernandez
029f1caa52 Cleanup jid_destroy to auto_jid
Remove unused variables
Apply minor cleanups
2023-07-13 17:05:07 +02:00
John Hernandez
8304ac86ff g_free() to auto_gfree, introduce auto_guchar
Fix 11 potential mem leaks in theme.c
2023-07-13 17:04:59 +02:00
John Hernandez
e1d137f4e6 Change char->free to auto_char char for autocleanup
Replace `gchar` and `g_free` to `auto_gchar`
Correct certain  `char` functions/variables to `gchar`

Related to #1819.

Edited by @jubalh.
2023-07-11 13:26:37 +02:00
Michael Vetter
e59c401c84 Adapt to g_string_free glib 2.75.3 change
glib 2.75.3 changes warning behaviour of `g_string_free()`.
See:
* https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3219
* https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3226

Use this opportunity to replace the use of GString with
`g_strdup_printf()` where possible.
Otherwise correctly take the return value of `g_string_free()`
which is nicer anyways.
2023-03-21 10:53:10 +01:00
Michael Vetter
057c9ad776 Add config.h in files were it was missing
Related to https://github.com/profanity-im/profanity/issues/1512
2021-03-26 19:54:22 +01:00
Michael Vetter
a2726b6a7d Apply coding style 2020-07-07 14:18:57 +02:00
Michael Vetter
a4cadf78fa Revert "Apply coding style"
This reverts commit 9b55f2dec0.

Sorting the includes creates some problems.
2020-07-07 13:53:30 +02:00
Michael Vetter
9b55f2dec0 Apply coding style
Regards https://github.com/profanity-im/profanity/issues/1396
2020-07-07 09:43:28 +02:00
Michael Vetter
de8975c008 Add and use connection_get_barejid()
Instead of connection_get_fulljid() and then creating a Jid from it.
2020-05-25 13:04:19 +02:00
DebXWoody
6268f5f0d7
OMEMO Device List only for non anonymous MUCs
Profanity request the OMEMO Device List for all members, also if the MUC is
anonymouse. If the user is Admin / Owner, the device list will be requtest.

Issue #1315
2020-04-17 19:53:34 +02:00
Michael Vetter
063b5243f1 Free jid in muc_members_add()
Fix memleak.
2020-02-25 16:31:41 +01:00
Paul Fariello
a52e3ea1d8 Add context to autocomplete_with_func and use it for omemo trust command
Fix #1068
2020-01-31 10:07:08 +01:00
Paul Fariello
84506cbaeb Use OMEMO for offline MUC members (#1242) 2020-01-20 14:28:13 +01:00
Michael Vetter
46fd7150e5 Add vim modeline 2019-11-13 12:11:05 +01:00
Michael Vetter
94b401ab96 Fix invalid read in muc code
We didn't set the variables to NULL, but the rest of the code depends on
this check.
```
==22201== Invalid read of size 8
==22201==    at 0x44E560: autocomplete_clear (autocomplete.c:69)
==22201==    by 0x427B2C: muc_invites_clear (muc.c:190)
==22201==    by 0x461328: ev_disconnect_cleanup (common.c:59)
==22201==    by 0x463FB5: cl_ev_disconnect (client_events.c:91)
==22201==    by 0x431252: cmd_disconnect (cmd_funcs.c:1234)
==22201==    by 0x47E883: clears_chat_sessions
(test_cmd_disconnect.c:28)
==22201==    by 0x487E9E1: _run_test (in /usr/lib64/libcmocka.so.0.7.0)
==22201==    by 0x487ECCC: _run_tests (in /usr/lib64/libcmocka.so.0.7.0)
==22201==    by 0x47F1BE: main (unittests.c:629)
==22201==  Address 0x814b690 is 0 bytes inside a block of size 24 free'd
==22201==    at 0x48379AB: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==22201==    by 0x44E5F7: autocomplete_free (autocomplete.c:90)
==22201==    by 0x4278A0: muc_close (muc.c:97)
==22201==    by 0x47DBAA: cmd_join_uses_password_when_supplied
(test_cmd_join.c:169)
==22201==    by 0x487E9E1: _run_test (in /usr/lib64/libcmocka.so.0.7.0)
==22201==    by 0x487ECCC: _run_tests (in /usr/lib64/libcmocka.so.0.7.0)
==22201==    by 0x47F1BE: main (unittests.c:629)
==22201==  Block was alloc'd at
==22201==    at 0x483677F: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==22201==    by 0x44E51B: autocomplete_new (autocomplete.c:57)
==22201==    by 0x427837: muc_init (muc.c:88)
==22201==    by 0x47DA77: cmd_join_uses_password_when_supplied
(test_cmd_join.c:154)
==22201==    by 0x487E9E1: _run_test (in /usr/lib64/libcmocka.so.0.7.0)
==22201==    by 0x487ECCC: _run_tests (in /usr/lib64/libcmocka.so.0.7.0)
==22201==    by 0x47F1BE: main (unittests.c:629)
```
2019-10-06 19:00:46 +02:00
Paul Fariello
8c71a74afe Ensure MUC is Non-Anonymous before starting OMEMO
Store MUC anonymous type in mucwin for that purpose.

Fixes #1065
2019-04-17 13:56:27 +02:00
Michael Vetter
706af9a900 Update copyright to include 2019 2019-01-22 11:31:45 +01:00
James Booth
d65fc24658 Fix muc nick autocomplete colon mid message 2018-02-09 20:47:41 +00:00
James Booth
cba17faf3d Add /rooms service autocompletion 2018-02-05 21:40:32 +00:00
James Booth
250e972b7a Update copyright 2018-01-21 15:00:02 +00:00
James Booth
6b830277a6 Allow previous autocompletion with shift tab 2017-04-01 00:27:11 +01:00
James Booth
68a3daedb9 Update Copyright 2017-01-28 17:24:22 +00:00
James Booth
0a57c4de78 Tidy headers 2016-07-24 15:43:51 +01:00
James Booth
5bc38b6bc2 Moved window_list.c 2016-07-24 15:14:46 +01:00
James Booth
2af0d38e3d Moved muc.c 2016-07-24 15:02:43 +01:00