aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-12-28 14:23:29 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-12-28 14:23:29 +0200
commit1b01a1679d920b0e78390bf417391cea46b059db (patch)
tree6a8460508c0b125a9cfd61d9f46f668a00262942
parent242e68fa6cd54aa5b5d8b7ed6618863946de037d (diff)
downloadanubis-1b01a1679d920b0e78390bf417391cea46b059db.tar.gz
anubis-1b01a1679d920b0e78390bf417391cea46b059db.tar.bz2
Bugfixes.
* configure.ac: Initialize WITH_GSASL. * src/gpg.c (passphrase_cb): Fix non-ansi C code.
-rw-r--r--configure.ac1
-rw-r--r--src/gpg.c17
2 files changed, 9 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 8536913..4638ae1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,6 +191,7 @@ WITH_SQL=no
WITH_MYSQL=no
WITH_POSTGRES=no
WITH_GDBM=no
+WITH_GSASL=no
dnl Use option --with-gsasl to compile GSASL library support.
MU_CHECK_GSASL(0.2.3, [
diff --git a/src/gpg.c b/src/gpg.c
index 79edcdf..900b7cf 100644
--- a/src/gpg.c
+++ b/src/gpg.c
@@ -119,15 +119,14 @@ gpgme_error_t
passphrase_cb (void *hook, const char *uid_hint, const char *passphrase_info,
int prev_was_bad, int fd)
{
- if (!passphrase_info)
- return 0;
-
- size_t len = strlen(gpg.passphrase);
- if (write (fd, gpg.passphrase, len) != len)
- return gpg_error(GPG_ERR_CANCELED);
- if (write (fd, "\n", 1) != 1)
- return gpg_error(GPG_ERR_CANCELED);
-
+ if (passphrase_info)
+ {
+ size_t len = strlen(gpg.passphrase);
+ if (write (fd, gpg.passphrase, len) != len)
+ return gpg_error(GPG_ERR_CANCELED);
+ if (write (fd, "\n", 1) != 1)
+ return gpg_error(GPG_ERR_CANCELED);
+ }
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.