diff options
author | Gilles Chehade <gilles@poolp.org> | 2019-08-10 11:24:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-10 11:24:27 +0200 |
commit | ff474530dcafde17d31747e19dcf6b1f6eaaf7a3 (patch) | |
tree | da4c095b691045b284c8d0641a40e45454f3f9a1 | |
parent | fix Makefile.am (diff) | |
parent | Fix bug in table_socketmap: error check of getline (diff) | |
download | OpenSMTPD-extras-ff474530dcafde17d31747e19dcf6b1f6eaaf7a3.tar.xz OpenSMTPD-extras-ff474530dcafde17d31747e19dcf6b1f6eaaf7a3.zip |
Merge pull request #56 from ahendriksen/fix-table-socketmap-getline
Fix bug in table_socketmap: error check of getline
-rw-r--r-- | extras/tables/table-socketmap/table_socketmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/tables/table-socketmap/table_socketmap.c b/extras/tables/table-socketmap/table_socketmap.c index 659936a..5e91ac5 100644 --- a/extras/tables/table-socketmap/table_socketmap.c +++ b/extras/tables/table-socketmap/table_socketmap.c @@ -95,7 +95,7 @@ table_socketmap_query(const char *name, const char *key) fprintf(sockstream, "%s %s\n", name, key); fflush(sockstream); - if ((len = getline(&buf, &sz, sockstream)) != -1) { + if ((len = getline(&buf, &sz, sockstream)) == -1) { log_warnx("warn: socketmap has lost its socket"); (void)strlcpy(repbuffer, "lost connection to socket", sizeof repbuffer); ret = SM_PERM; |