| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Use gchar instead of char in most of the cases where gchar is intended.
Reason: improve compatibility and stability. Issue #1819
Minor refactoring.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
... to an iterative approach
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
|
|
| |
This also fixes memory leaks in `_omemo_autocomplete()`.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
| |
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
| |
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
|
|
|
|
|
|
| |
in before it just used the input command line as it was but this fixes
this by adding formatting using `format_call_external_argv` which is
already used in `url open` executable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unluckily here the code neglected the fact that glib will set an error
to a location that was pointed by the error pointer if it is not null.
but it was of an undefined value hence profanity crashed. now it is null
as it must be.
also spawn error is returned when glib could not spawn the task for
some reason like the executable file does not exist but if the exit
status was non-zero it neglected the exit error and tried to output a
spawn error instead. now we check whether the process that we
instantiated has exited successfully
also now code uses `g_spawn_check_wait_status` which
`g_spawn_check_exit_status` has been aliased to.
|
|
|
|
|
|
| |
We need to use a new one or call `g_clear_error()`.
Fix segfault in https://github.com/profanity-im/profanity/issues/1738
|
|
|
|
| |
Related to https://github.com/profanity-im/profanity/issues/1738
|
| |
|
|
|
|
| |
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our variable `alphabet` contains 62 alphanumeric symbols + '\0'.
When we use sizeof(alphabet) we will get 63 due to that.
But we want to choose a random numbers from the 62 alphanumeric letters only.
This mistake caused us to have strings with a max length of `length`
instead of the exact length.
When doing https://github.com/profanity-im/profanity/issues/1520
this caused our algo for muc reflection to not catch since we expect the
random ID to be exactly 15 symbols long in `message_is_sent_by_us()`.
|
|
|
|
|
|
|
| |
_GNU_SOURCE was even in some files where it was not needed at all
(http*).
Let's replace asprintf() with g_strdup_printf().
|
|
|
|
|
| |
Rationale: When copying an image in some application, a URL instead of a
path is copied to the clipboard.
|
| |
|
|
|
|
| |
I see no reason to inherit the stdin, so let's have it disabled.
|
| |
|
| |
|
|
|
|
| |
Forgot about that :(
|
|
|
|
|
|
|
|
| |
unique_filename_from_url() is used for `/url save`.
It doesn't recognize ~ by itself, we need to expand it first.
Mentioned in
https://github.com/profanity-im/profanity/pull/1375#pullrequestreview-547892462
|
| |
|
| |
|
| |
|
|
|
|
| |
We require c99/gnu99 anyways.
|
|
|
|
| |
We can use strchr() here.
|
|
|
|
|
|
| |
- Add NetBSD as a recognized platform without -ldl.
- Allow building with NetBSD libcurses instead of ncurses.
- Portability to NetBSD sh - use POSIX '=' instead of '=='.
|
| |
|
|
|
|
|
|
| |
This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2.
Sorting the includes creates some problems.
|
|
|
|
| |
Regards https://github.com/profanity-im/profanity/issues/1396
|
| |
|
|
|
|
|
|
| |
"base" was not really base but the filename :-)
Fix https://github.com/profanity-im/profanity/issues/1362
|
|
|
|
| |
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
|
| |
|
|
|
|
| |
Not needed anymore since 0942d98c6116dc4b9b608e7483f1d6a8f62c84d7
|
|
|
|
|
|
|
|
|
|
| |
glib functions can allocate a GError object that must be freed with
g_error_free(). Otherwise a memory leak happens.
There are similar unfixed places in omemo, check:
grep "&error" src/omemo/omemo.c
Fixes #1304.
|
|
|
|
|
|
| |
So we can use it somewhere else too.
Regards https://github.com/profanity-im/profanity/issues/1261
|
| |
|
| |
|
|
|
|
|
| |
Move the code that creates a random string into it's own function
+get_random_string().
|
|
|
|
|
|
|
| |
In case of error print the error. And return right value.
Improvement based on @pasis advice in https://github.com/profanity-im/profanity/pull/1036
Applying in preparation to merge that PR.
|
|
|
|
| |
Like discussed with James.
|
|
|
|
|
|
|
|
|
|
| |
mblen will fail with return code -1 if the locale used by the unit tests
isn't available on the machine. This will lead to an off by one error in some
tests where the needle is at the end of the haystack.
Since prof_occurrences expect null-terminated strings, the character after
the needle can simply be found by incrementing the address of the found needle
with strlen(needle).
|
|
|
|
| |
Regards https://github.com/profanity-im/profanity/issues/1085
|
| |
|
|\
| |
| | |
Get rid of p_sha1 dependency
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move `p_sha1_hash()` from `common.c` to `xmpp/stanza.c` as it is only
used in this file and now depends on libstrophe so xmpp is a better
namespace folder.
Renaming it as `_stanza_create_sha1_hash()`. And making static since
only used here.
The function cannot be tested in the unit tests anymore.
Once functional tests are working again we should write a test for the
sha1 functionality.
|
| |
| |
| |
| |
| |
| |
| | |
Using libstrophes sha1 functions in p_sha1_hash() to get rid of the
p_sha1.c dependency.
Relates to https://github.com/boothj5/profanity/issues/882
|