about summary refs log tree commit diff stats
path: root/src/xmpp/connection.c
Commit message (Collapse)AuthorAgeFilesLines
* fixup 11f52ad5474c7adb7f11df5b0c318597e4150312Steffen Jaeckel2022-08-081-3/+6
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* integrate XEP-0198 Stream-ManagementSteffen Jaeckel2022-08-081-0/+25
| | | | | | | | | * save SM state and send-queue entries on disconnect * restore SM state and send-queue entries on reconnect fixes #698 Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Update copyright yearMichael Vetter2022-05-091-1/+1
|
* clean-up connection (act I)Steffen Jaeckel2022-03-301-152/+63
| | | | | | | | | * use custom memory descriptor that `abort()`s on `malloc()` failure * use static log descriptor * don't always re-create all contexts * de-duplicate code of `.._connect()` and `.._register()` Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* also store PEM in `TLSCertificate`Steffen Jaeckel2022-03-221-1/+2
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* prevent segfaultSteffen Jaeckel2022-03-131-4/+8
| | | | | | | In case we're not connected yet and press Alt+c a segfault occurred since `conn.xmpp_conn` is dereferenced while it's still `NULL`. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Set libstrophe log verbosityMichael Vetter2022-02-211-0/+1
| | | | | | | | | | | | | | | Set this to 0. We might want to have this configurable later. For now we fix the valgrind report: ``` Conditional jump or move depends on uninitialised value xmpp_debug_verbose() ``` Which will be fixed in libstrophe > 0.11.0 by commit https://github.com/strophe/libstrophe/commit/28f3ce19b803b3c2628c37545e3f5b88e7ea1a55
* Fix off-by-oneSteffen Jaeckel2022-02-011-2/+2
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add missing IPv6 handlingSteffen Jaeckel2022-02-011-5/+22
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add fall-back for older GLib versionsSteffen Jaeckel2022-02-011-18/+54
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* handle `see-other-host` XMPP stream errorSteffen Jaeckel2022-02-011-0/+72
| | | | | | Fixes #1628 Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* auto-formatSteffen Jaeckel2022-02-011-1/+1
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* use new libstrophe APISteffen Jaeckel2021-10-271-43/+23
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* first step to remove libmesodeSteffen Jaeckel2021-10-271-6/+0
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Format new register code correctlyMichael Vetter2021-10-131-30/+33
|
* Merge pull request #1574 from binex-dsk/masterMichael Vetter2021-10-131-1/+356
|\ | | | | | | Add in-band account registration Fix https://github.com/profanity-im/profanity/issues/199
| * registration: memory leaks, error checkingswirl2021-10-131-4/+5
| |
| * fixed crashes when server doesn't support registrationswirl2021-10-101-1/+1
| |
| * registration: remove auth param and excess functionsswirl2021-08-171-114/+1
| |
| * REGISTRATION FIXEDMichael Vetter2021-08-171-8/+8
| |
| * progress on fixing registrationswirl2021-08-171-4/+5
| | | | | | | | | | | | doesnt segfault on register, but aborts when you type after registering need to find a way to disconnect later
| * hacky fix(?) for registerswirl2021-08-171-1/+346
| | | | | | | | very bad and spaghetti will fix later
| * fixed some bugs, added some moreswirl2021-08-171-1/+16
| | | | | | | | | | | | | | | | | | - Added JABBER_RAW_CONNECT[ING/ED] connection states - Added cl_ev_connect_raw and session_connect_raw to conform to normal connection functions - Fixed SIGABRT during registration - Added a check in cmd_register to ensure it's actually connected before registering--but this will always fail atm
| * initial register command testswirl2021-08-171-0/+106
| |
* | Format code correctlyMichael Vetter2021-10-051-3/+3
|/
* Goodbye beautiful IDsMichael Vetter2021-04-141-22/+10
| | | | | | | | | | | | | | | It was a great ride! IDs look instead of `TE5BTDc2ZTc3YTMwZGU3MDgzMzllOTliNGExNjVmMjZkMTY1ZmUyZGEyNTUxMjVmODBkMmQzOGMxYWI2ZjAxNzdiM2Q=` more like `7HcnNSoO1MVvb0p9a9e293152922853e910b8b1a65bb26e225a0568` now. Regards https://github.com/profanity-im/profanity/issues/1520 We still has our identifier into it to filter MUC reflected messages. profident maybe should be changed to be longer or be generated upon each start.
* Add command to change password of logged in userThorben Günther2021-03-111-0/+13
|
* Logging [CONNECTION]Stefan2021-03-091-0/+1
|
* Require libstrophe/libmesode 0.10.0Michael Vetter2020-09-301-8/+0
|
* Apply coding styleMichael Vetter2020-07-071-88/+114
|
* Revert "Apply coding style"Michael Vetter2020-07-071-118/+92
| | | | | | This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2. Sorting the includes creates some problems.
* Apply coding styleMichael Vetter2020-07-071-92/+118
| | | | Regards https://github.com/profanity-im/profanity/issues/1396
* Fix reading/writing linked filesMichael Vetter2020-06-131-1/+1
| | | | | | "base" was not really base but the filename :-) Fix https://github.com/profanity-im/profanity/issues/1362
* Make legacy auth optionalDmitry Podgorny2020-06-111-0/+9
| | | | | | | | Some systems don't provide recent libstrophe releases. When older version of libstrophe is detected, don't build legacy auth support. To simplify this patch, report about unsupported legacy auth and keep commands option as is.
* Add option for legacy authenticationDmitry Podgorny2020-06-051-6/+28
| | | | | | | | New options: /connect <account> [auth default|legacy] /account <account> set auth default|legacy Fixes #1236.
* Add and use connection_get_barejid()Michael Vetter2020-05-251-0/+12
| | | | Instead of connection_get_fulljid() and then creating a Jid from it.
* Add vim modelineMichael Vetter2019-11-131-0/+1
|
* Display ownership of connection_get_profanity_identifierMichael Vetter2019-10-221-1/+1
|
* Use UUID in origin-id and idMichael Vetter2019-10-221-5/+5
| | | | | Let's use UUID to have a more random string then just 10 alphanumeric values.
* Set prof_ident to NULL after freeMichael Vetter2019-10-211-1/+2
| | | | | | | | | | | | | | | | | | This caused the bug mentioned in the PR comment: ``` It seems with the changes done here we get a crash in: src/xmpp/message.c message_handlers_init() when looking up handlers: ProfMessageHandler *handler = g_hash_table_lookup(pubsub_event_handlers, curr->data);. Steps to reproduce: open Profanity and connect /autoping set 10 /autoping timeout 10 stop WiFi/connection wait for Lost connection restart wifi /connect ```
* Rename _calculate_identifier to _compute_identifierMichael Vetter2019-10-201-3/+3
|
* Rename random_bytes to profanity_instance_idMichael Vetter2019-10-191-6/+6
|
* Free hmac and msgidMichael Vetter2019-10-191-0/+3
|
* Free prof_identifier in case of reconnectMichael Vetter2019-10-191-0/+3
| | | | Bedore we assign it new.
* Change origin-id/id algoMichael Vetter2019-10-181-10/+10
| | | | | Hash twice. Use HMAC SHA256 from glib.
* Log incoming MUC messages if origin-id sais they dont come from usMichael Vetter2019-10-181-10/+7
| | | | Regards https://github.com/profanity-im/profanity/issues/1201
* Remove prefix from stanza idMichael Vetter2019-10-171-1/+1
| | | | | We sent `prof_prefix_uuid` as id. Where the prefix was also optional. We don't need this at all.
* Change algo for connection_create_stanza_id()Michael Vetter2019-10-171-7/+11
|
* Change connection_create_stanza_id()Michael Vetter2019-10-171-11/+11
| | | | | To return identifier and uuid together. We can remove the prefix later on.
* Calculate identifier upon connectMichael Vetter2019-10-161-5/+28
| | | | | | | This will be needed so that we can later detect if messages (origin-in) was sent by us. Regards https://github.com/profanity-im/profanity/issues/1207