about summary refs log tree commit diff stats
path: root/src/xmpp/roster_list.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix memory leak of presence objectDmitry Podgorny2020-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The memory leak happens when a presence is received for a MUC room. The JID is not present in the roster, so updating its status is ignored. We have to free resource in this case, because it has no owner and is lost otherwise. ==25736== 47 (32 direct, 15 indirect) bytes in 1 blocks are definitely lost in loss record 1,625 of 3,399 ==25736== at 0x4A330FF: malloc (vg_replace_malloc.c:309) ==25736== by 0x13A962: resource_new (resource.c:47) ==25736== by 0x145501: _available_handler (presence.c:665) ==25736== by 0x145501: _presence_handler (presence.c:399) ==25736== by 0x145501: _presence_handler (presence.c:358) ==25736== by 0x80D5F34: handler_fire_stanza (in /usr/lib64/libstrophe.so.0.0.0) ==25736== by 0x80D2B49: _handle_stream_stanza (in /usr/lib64/libstrophe.so.0.0.0) ==25736== by 0x80E15CE: _end_element (in /usr/lib64/libstrophe.so.0.0.0) ==25736== by 0x843EE9B: doContent (in /usr/lib64/libexpat.so.1.6.10) ==25736== by 0x843F94B: contentProcessor (in /usr/lib64/libexpat.so.1.6.10) ==25736== by 0x8441E77: XML_ParseBuffer (in /usr/lib64/libexpat.so.1.6.10) ==25736== by 0x80D586B: xmpp_run_once (in /usr/lib64/libstrophe.so.0.0.0) ==25736== by 0x13E07E: connection_check_events (connection.c:119) ==25736== by 0x13869C: prof_run (profanity.c:129) Fixes #1279.
* Add context to autocomplete_with_func and use it for omemo trust commandPaul Fariello2020-01-311-4/+4
| | | | Fix #1068
* Add vim modelineMichael Vetter2019-11-131-0/+1
|
* Remove duplicate code in roster_updateMichael Vetter2019-08-231-9/+1
| | | | | Part of what `roster_update()` does manually is actually done in `roster_change_name()`.
* Fix memleak in roster_change_name()Michael Vetter2019-07-221-2/+2
|
* Fix memleak in roster_removeMichael Vetter2019-07-221-1/+1
| | | | strdup() is not needed here but will actually lead to a memleak.
* Fix memory leak in roster_update()Michael Vetter2019-07-221-1/+2
| | | | current_name should not be const and should be freed.
* Fix double free in roster_process_pending_presenceMichael Vetter2019-07-101-1/+0
| | | | This is taken care of now in the destructor _pendingPresence_free().
* Add destructor for roster_pending_presenceMichael Vetter2019-07-091-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Fix: ``` ==18682== 408 bytes in 17 blocks are definitely lost in loss record 3,279 of 3,632 ==18682== at 0x483677F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==18682== by 0x42F602: roster_update_presence (roster_list.c:129) ==18682== by 0x448AA3: sv_ev_contact_online (server_events.c:906) ==18682== by 0x43D2BA: _available_handler (presence.c:674) ==18682== by 0x43C81B: _presence_handler (presence.c:398) ==18682== by 0x5AF118E: handler_fire_stanza (handler.c:124) ==18682== by 0x5AEDBDA: _handle_stream_stanza (conn.c:1253) ==18682== by 0x5AFA43E: _end_element (parser_expat.c:190) ==18682== by 0x6818AA4: doContent (xmlparse.c:2977) ==18682== by 0x681A3AB: contentProcessor (xmlparse.c:2552) ==18682== by 0x681D7EB: XML_ParseBuffer (xmlparse.c:1988) ==18682== by 0x681D7EB: XML_ParseBuffer (xmlparse.c:1957) ==18682== by 0x5AF0A63: xmpp_run_once (event.c:255) ==18682== by 0x432E5D: connection_check_events (connection.c:104) ==18682== by 0x4323B3: session_process_events (session.c:255) ==18682== by 0x42C097: prof_run (profanity.c:128) ==18682== by 0x4B25B9: main (main.c:172) ```
* statusbar: check if roster existsMichael Vetter2019-06-041-0/+8
| | | | | | | | | | | | We destory the roster in ev_disconnect_cleanup(). Adding a function to test if the roster has been destroyed and testing for it in the statusbar. So now when the connection is lost 'Lost connection' is printed in all open windows. We can then reconnect with `/connect accountname`. Should fix https://github.com/profanity-im/profanity/issues/1083
* Handle presence received before rosterPaul Fariello2019-04-171-0/+43
| | | | | | | | | | Presence of contact not found in roster are filtered out. But sometimes roster is received after a first few presences. We choose to store presences until we receive roster and then process this presences. Fixes #1050
* Update copyright to include 2019Michael Vetter2019-01-221-1/+1
|
* Make _get_groups_from_item and roster _compare_* publicPaul Fariello2018-09-261-13/+11
| | | | In order to avoid duplication with xep 0133 support in command execution
* Update copyrightJames Booth2018-01-211-1/+1
|
* Allow previous autocompletion with shift tabJames Booth2017-04-011-9/+9
|
* Update CopyrightJames Booth2017-01-281-1/+1
|
* Tidy headersJames Booth2016-07-241-3/+3
|
* Moved roster_list.cJames Booth2016-07-241-0/+668