projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3050f1
)
Added debug output for failure cases in sgpgme_data_release_and_get_mem()
author
Andrej Kacian
<ticho@claws-mail.org>
Wed, 8 Mar 2017 11:07:51 +0000
(12:07 +0100)
committer
Andrej Kacian
<ticho@claws-mail.org>
Wed, 8 Mar 2017 11:07:51 +0000
(12:07 +0100)
src/plugins/pgpcore/sgpgme.c
patch
|
blob
|
history
diff --git
a/src/plugins/pgpcore/sgpgme.c
b/src/plugins/pgpcore/sgpgme.c
index 54289f60661b892ee8a3295b884fbdc24f41163d..db9b354aaf3d1f95452080fef1fd0ce681cafd2c 100644
(file)
--- a/
src/plugins/pgpcore/sgpgme.c
+++ b/
src/plugins/pgpcore/sgpgme.c
@@
-1126,10
+1126,8
@@
void *sgpgme_data_release_and_get_mem(gpgme_data_t data, size_t *len)
ssize_t r = 0;
size_t w = 0;
- if (data == NULL)
- return NULL;
- if (len == NULL)
- return NULL;
+ cm_return_val_if_fail(data != NULL, NULL);
+ cm_return_val_if_fail(len != NULL, NULL);
/* I know it's deprecated, but we don't compile with _LARGEFILE */
cm_gpgme_data_rewind(data);
@@
-1150,6
+1148,7
@@
void *sgpgme_data_release_and_get_mem(gpgme_data_t data, size_t *len)
gpgme_data_release(data);
if (r < 0) {
+ g_warning("gpgme_data_read() returned an error: %d", (int)r);
free(result);
*len = 0;
return NULL;