diff options
Diffstat (limited to 'assuan/assuan-listen.c')
-rw-r--r-- | assuan/assuan-listen.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/assuan/assuan-listen.c b/assuan/assuan-listen.c index 04f138ef..04db68ce 100644 --- a/assuan/assuan-listen.c +++ b/assuan/assuan-listen.c @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #include <config.h> @@ -23,6 +24,7 @@ #include <stdio.h> #include <string.h> #include <unistd.h> +#include <errno.h> #include "assuan-defs.h" @@ -30,7 +32,7 @@ assuan_error_t assuan_set_hello_line (assuan_context_t ctx, const char *line) { if (!ctx) - return ASSUAN_Invalid_Value; + return _assuan_error (ASSUAN_Invalid_Value); if (!line) { xfree (ctx->hello_line); @@ -40,7 +42,7 @@ assuan_set_hello_line (assuan_context_t ctx, const char *line) { char *buf = xtrymalloc (3+strlen(line)+1); if (!buf) - return ASSUAN_Out_Of_Core; + return _assuan_error (ASSUAN_Out_Of_Core); if (strchr (line, '\n')) strcpy (buf, line); else @@ -73,7 +75,7 @@ assuan_accept (assuan_context_t ctx) const char *p, *pend; if (!ctx) - return ASSUAN_Invalid_Value; + return _assuan_error (ASSUAN_Invalid_Value); if (ctx->pipe_mode > 1) return -1; /* second invocation for pipemode -> terminate */ @@ -134,7 +136,7 @@ assuan_error_t assuan_close_input_fd (assuan_context_t ctx) { if (!ctx || ctx->input_fd == -1) - return ASSUAN_Invalid_Value; + return _assuan_error (ASSUAN_Invalid_Value); _assuan_close (ctx->input_fd); ctx->input_fd = -1; return 0; @@ -146,7 +148,7 @@ assuan_error_t assuan_close_output_fd (assuan_context_t ctx) { if (!ctx || ctx->output_fd == -1) - return ASSUAN_Invalid_Value; + return _assuan_error (ASSUAN_Invalid_Value); _assuan_close (ctx->output_fd); ctx->output_fd = -1; |