about summary refs log tree commit diff stats
path: root/src/xmpp/iq.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed Date format for MAM requestDebXWoody2020-10-281-2/+2
| | | | | | | | | Using g_date_time_new_now_utc instead of g_date_time_new_now_local Using g_date_time_format(timestamp, "%FT%TZ") instead of "%FT%T%:::z" Edit: DebXWoody created this patch because ejabberd returned an error with the old date format.
* Apply coding styleMichael Vetter2020-07-071-551/+566
|
* Revert "Apply coding style"Michael Vetter2020-07-071-577/+563
| | | | | | This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2. Sorting the includes creates some problems.
* Apply coding styleMichael Vetter2020-07-071-563/+577
| | | | Regards https://github.com/profanity-im/profanity/issues/1396
* Incoming iq stanza - Reset the autoping timerDebXWoody2020-05-231-0/+2
| | | | | | | | A autoping is to make sure that there is still a connection between server and client. If the application receives incoming stanza, the connection is fine. There is no need to wait for response, if there are other incomings. Issue: #1333 and #1315
* xep-0092: make it possible to ask servers or components for softwareMichael Vetter2020-05-141-17/+28
| | | | | | | | | | | This adds the new `/serversoftware` command. ``` /software user@domain.org/resource /serversoftware domain.org ``` Fix https://github.com/profanity-im/profanity/issues/1338
* _iq_id_handler_free() dont set NULLMichael Vetter2020-04-201-1/+0
| | | | No effect here.
* Don't expose upload_processesMichael Vetter2020-04-171-1/+1
| | | | | | | | That's actually not good practise. Realized this when checking for multiple symbol definition in issue mentioned below. Regards https://github.com/profanity-im/profanity/issues/1314
* Review logging in iq.cMichael Vetter2020-04-141-27/+39
|
* Free timestamp correctlyMichael Vetter2020-04-131-2/+3
| | | | g_date_time_add_days() actually creates a new one.
* Check if server suppors MAMMichael Vetter2020-04-121-2/+5
|
* Get MAM since yesterdayMichael Vetter2020-04-121-1/+7
| | | | | | | | | | | | | Later we will have several options. Getting everything since last timestamp (if none everything at all). Getting everything since today + configure time (1 week). Should also have a reload all command like conversations once you cleared the history. All MAM messages should be written into sql db. And then probably displayed from there so that regular history works too.
* First MAM testMichael Vetter2020-04-111-0/+19
| | | | | | Send a request (which we can't handle yet) :-) Regards https://github.com/profanity-im/profanity/issues/660
* Use proper OS names for OpenBSD and NetBSDMichael Vetter2020-03-091-2/+2
|
* Fix few memory leaksDmitry Podgorny2020-02-271-0/+2
|
* xep-0092: add config option to set whether OS is revealedMichael Vetter2020-01-231-14/+22
| | | | | | Default is on. `revail.os=false` in the `connection` section of the config can disable it. A command to configure this will follow.
* xep-0092: send OS tooMichael Vetter2020-01-231-0/+23
| | | | | So far we only sent client name and version. Let's also send the OS name.
* Add option to notify about version requestMichael Vetter2020-01-231-0/+8
| | | | | | | | | | Cannot be configured for now. Can be set via `adv.notify.discoversion` in the `notification` section. Will notify about version requests via XEP-0092 and XEP-0232. Client version can still be seen via caps (capabilities). See `stanza_attach_caps()`.
* Save MUC room name in ProfMucWinMichael Vetter2020-01-231-0/+4
| | | | We will need this if we want to display the Name instead of the JID.
* Use OMEMO for offline MUC members (#1242)Paul Fariello2020-01-201-8/+33
|
* Add vim modelineMichael Vetter2019-11-131-0/+1
|
* Remove old commentMichael Vetter2019-10-211-1/+0
| | | | | It's not up to date. Some time ago we changed from individual handlers to general ones.
* Remove prefix from stanza idMichael Vetter2019-10-171-7/+7
| | | | | We sent `prof_prefix_uuid` as id. Where the prefix was also optional. We don't need this at all.
* Fix memleak in /cmd execPaul Fariello2019-07-301-0/+7
|
* Fix command form submitPaul Fariello2019-07-301-1/+1
| | | | | Command form userdata were freed by iq_id_handler. We should now free the command ourself.
* Fixup for last commitMichael Vetter2019-07-121-1/+0
|
* Fix segfault in iq_{submit,cancel}_command_configMichael Vetter2019-07-121-6/+0
| | | | Taken care of by the destructor.
* Fix some more potential double freesMichael Vetter2019-07-111-34/+0
| | | | Regards https://github.com/profanity-im/profanity/issues/1148
* Fix double free in room id handlerMichael Vetter2019-07-091-6/+1
| | | | | Free is done in destructor now. Regards https://github.com/profanity-im/profanity/issues/1148
* Fix double free regarding iq handlersMichael Vetter2019-07-081-14/+4
|
* Free iq_id_handlers correctlyMichael Vetter2019-07-041-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | so far only the key part was freed. We also need to free the actual handler. Fix: ``` ==21171== 1,128 bytes in 47 blocks are definitely lost in loss record 3,476 of 3,670 ==21171== at 0x483677F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==21171== by 0x434248: iq_id_handler_add (iq.c:265) ==21171== by 0x4B122E: omemo_devicelist_request (omemo.c:46) ==21171== by 0x4AC411: omemo_start_session (omemo.c:409) ==21171== by 0x4AC37C: omemo_start_sessions (omemo.c:396) ==21171== by 0x447881: sv_ev_roster_received (server_events.c:189) ==21171== by 0x444019: roster_result_handler (roster.c:312) ==21171== by 0x433FC2: _iq_handler (iq.c:202) ==21171== by 0x5AF118E: ??? (in /usr/lib64/libmesode.so.0.0.0) ==21171== by 0x5AEDBDA: ??? (in /usr/lib64/libmesode.so.0.0.0) ==21171== by 0x5AFA43E: ??? (in /usr/lib64/libmesode.so.0.0.0) ==21171== by 0x6818AA4: ??? (in /usr/lib64/libexpat.so.1.6.8) ==21171== by 0x681A3AB: ??? (in /usr/lib64/libexpat.so.1.6.8) ==21171== by 0x681D7EB: XML_ParseBuffer (in /usr/lib64/libexpat.so.1.6.8) ==21171== by 0x5AF0A63: xmpp_run_once (in /usr/lib64/libmesode.so.0.0.0) ==21171== by 0x432E5D: connection_check_events (connection.c:104) ==21171== by 0x4323B3: session_process_events (session.c:255) ==21171== by 0x42C097: prof_run (profanity.c:128) ==21171== by 0x4B2627: main (main.c:172) ```
* Call iq_handlers_clear() upon disconnectMichael Vetter2019-06-201-0/+8
| | | | Free id_handlers. Fix memory leaks.
* Cancel autoping timer on disconnect or connection lossDmitry Podgorny2019-06-031-8/+12
| | | | | | | | | If Profanity is disconnected in any way before ping response is received, the autoping timer will expire after the next connection is established. As result, user will be disconnected immediately. Cancel autoping timer in ev_disconnect_cleanup(), so it is done for all kind of disconnections.
* Handle MUC anonymous state when auto starting OMEMOPaul Fariello2019-04-171-2/+14
| | | | | | | When auto joining a MUC we don't have access to required information so we just don't start OMEMO at this time. Once we receive disco info we then try to start OMEMO.
* Wait for discovery end to publish omemo devicelist and bundlePaul Fariello2019-04-101-0/+2
| | | | Add sv_ev_connection_features_received for that purpose
* Rename ProfIdCallback into ProfIqCallbackPaul Fariello2019-04-101-12/+12
| | | | Goal is to create other kind of callback no based on id cmp
* Update copyright to include 2019Michael Vetter2019-01-221-1/+1
|
* Fix optionnal sessionid in xep 0050Paul Fariello2019-01-211-1/+6
|
* Make _get_groups_from_item and roster _compare_* publicPaul Fariello2018-09-261-12/+2
| | | | In order to avoid duplication with xep 0133 support in command execution
* Add special handling for xep-0133 get-user-rosterPaul Fariello2018-09-101-3/+42
|
* Add support for ad-hoc response with formsPaul Fariello2018-09-101-0/+6
|
* Add missing command name for completion logPaul Fariello2018-09-101-1/+1
|
* Allow to use cmd without being in a windowPaul Fariello2018-09-051-2/+4
|
* Add support for command config executionPaul Fariello2018-09-051-3/+41
|
* Add conf win callbackPaul Fariello2018-09-051-29/+39
|
* Rename mucconf wins into conf winsPaul Fariello2018-09-051-4/+4
| | | | Configuration windows are now being used by both muc and cmd.
* Add support for form edition in command executionPaul Fariello2018-09-051-7/+24
| | | | Also change wins_get_by_string prototype in order to handle const str.
* Add command exec error handlingPaul Fariello2018-09-051-1/+1
|
* Handle simple executionPaul Fariello2018-09-051-1/+48
| | | | Tested with ping from biboumi
* Add command subcommands: list and execPaul Fariello2018-09-051-9/+76
| | | | Also handle list result