| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`data_dir` would have been leaked if directory creation failed.
`editor_argv` was leaked at some point, no idea why.
```
==1244734== 118 (32 direct, 86 indirect) bytes in 1 blocks are definitely lost in loss record 6,299 of 7,824
==1244734== at 0x4846CC3: realloc (vg_replace_malloc.c:1451)
==1244734== by 0x5E85AD0: g_realloc (in /usr/lib/libglib-2.0.so.0.7600.1)
==1244734== by 0x5E4A004: ??? (in /usr/lib/libglib-2.0.so.0.7600.1)
==1244734== by 0x5E4A7B1: g_ptr_array_add (in /usr/lib/libglib-2.0.so.0.7600.1)
==1244734== by 0x5EA4235: g_strsplit (in /usr/lib/libglib-2.0.so.0.7600.1)
==1244734== by 0x1F143C: get_message_from_editor (editor.c:92)
==1244734== by 0x193F6B: _inp_rl_send_to_editor (inputwin.c:950)
==1244734== by 0x614642F: _rl_dispatch_subseq (readline.c:916)
==1244734== by 0x6146C85: _rl_dispatch_callback (readline.c:823)
==1244734== by 0x616739F: rl_callback_read_char (callback.c:241)
==1244734== by 0x1923DB: inp_readline (inputwin.c:188)
==1244734== by 0x149860: prof_run (profanity.c:117)
==1244734== by 0x2283E8: main (main.c:186)
```
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
|
|
|
|
| |
Use gchar instead of char in most of the cases where gchar is intended.
Reason: improve compatibility and stability. Issue #1819
Minor refactoring.
|
|
|
|
|
|
|
|
| |
`found` was leaked before
This was somehow missed in e9aaba938b4f1b62b5f9018583a82ed7e7180977
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
|
|
|
|
| |
* Make editor executable into a string to be able to support
(multiple) flags.
* Change /help executable to suit this new feature
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Fixes https://github.com/profanity-im/profanity/issues/1794
Explanation
The problem is the download's identifier. Downloads are given an ID so they can be referenced later when their progress changes. Currently, the download's ID is the download's URL. When you download the same file twice, you have two downloads with the same ID. Download progress updates are shown on the first of both downloads with the same ID.
Solution
Change the download's ID from its URL to a random number. A random ID is generated when get_random_string() is called from cmd_funcs.c. Several other functions are updated to cope with the new ID format.
|
|
|
|
|
|
|
|
| |
After adding MAM quote and url autocompletion wouldn't pick up messages
from MAM or history(from DB) or would have them in the wrong order. This
commit fixes that.
Fixes https://github.com/profanity-im/profanity/issues/1770
|
|
|
|
| |
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
|
|
|
|
|
|
|
| |
* fix typo
* less code duplication
* less `GString` usage
* more `auto_gchar` usage
* document connecting to servers supporting SASL ANONYMOUS
* ignore valgrind output
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
| |
|
|
|
|
|
|
|
|
| |
Drawback is that we can't check the exitcode anymore.
But we were unsure why/when we need this, see:
https://github.com/profanity-im/profanity/pull/1760/files#r980868708
Fixes https://github.com/profanity-im/profanity/issues/1759
|
|
|
|
| |
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
| |
That was pulled in through log.h
|
|
|
|
| |
That was pulled in through log.h
|
|
|
|
|
|
|
|
|
| |
"" used to become " now it just becomes an empty argument.
Also if quotes appeared after a token started then if the number of
quotes in the token is n the resulting one would be a token with the
n last characters cut off, now it's fixed.
Fixes https://github.com/profanity-im/profanity/issues/497
|
| |
|
|
|
|
| |
The variable `ccount->tls_policy` was not null-tested before `strcmp`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case the user decides to ignore the validity-state of certificates
we also have to configure libcurl accordingly.
`tls.policy` can be set via
```
/account set <account> tls trust
```
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
|
|
|
|
| |
The profanity-internal mechanism to allow connecting to a server isn't
easily portable to cURL. Therefor introduce a profanity-specific CAfile
which is managed individually and will be configured in libcurl calls.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
|
|
|
| |
* use GLib functions to write&read compose file
* trim trailing new-line characters from compose file
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Fix on openbsd:
`src/tools/editor.c:55:36: error: 'S_IRWXU' undeclared (first use in
this function)`
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
| |
|
|
|
|
|
|
|
|
| |
Fixes the bug mentioned in
https://github.com/profanity-im/profanity/issues/1478#issuecomment-794161606
The rest of https://github.com/profanity-im/profanity/issues/1478 I
can't reproduce. Seems to work fine.
|
|
|
|
|
|
|
|
|
|
| |
This bug was introduced in 1ec606540eb0f474f3d968d3566a7c56d778a367 when
`g_strdup_printf` was used instead of `asprintf`.
Problem discoverd by raspeguy.
Mistake discovered by optmzr and Martin.
Thanks to everybody involved!
|
|
|
|
|
|
|
| |
_GNU_SOURCE was even in some files where it was not needed at all
(http*).
Let's replace asprintf() with g_strdup_printf().
|
|
|
|
| |
Related to https://github.com/profanity-im/profanity/issues/1512
|
|
|
|
|
|
| |
_search_next and _search_prev where exactly the same except taking the
nex/prev from the list.
Use one function with a direction argument.
|
|
|
|
|
|
|
|
| |
Through asprintf() we can get rid of malloc() + sprintf().
Also we don't need to calculate the strlen() again since asprintf()
returns the bytes printes.
Only non UTF-8 characters. But that was true before already.
|
|
|
|
|
| |
autocomplete_param_with_func and -autocomplete_param_with_ac had lots of
duplicate code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Main changes:
1. Attributes instead of tags
2. Read the optional <header> tags and send them in the HTTP PUT header:
* Authorization
* Cookie
* Expires
Co-authored-by: Martin Dosch <martin@mdosch.de>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|