]> diplodocus.org Git - nmh/blobdiff - uip/popsbr.c
runpty.c: Move child slave code into new run_command().
[nmh] / uip / popsbr.c
index c5af09dd0421d25b10263a60096f7c116cb0647f..f913fce2ef5733e02818d879df4ee62c008de3b6 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <h/popsbr.h>
 #include <h/signals.h>
-#include "../sbr/base64.h"
+#include "sbr/base64.h"
 
 #define        TRM     "."
 
@@ -182,7 +182,7 @@ pop_init (char *host, char *port, char *user, char *proxy, int snoop,
           close(1);
           free(*argv);
           free(argv);
-          exit(10);
+          exit(1);
        }
 
        /* okay in the parent we do some stuff */
@@ -270,8 +270,10 @@ pop_init (char *host, char *port, char *user, char *proxy, int snoop,
 
        case NOTOK: 
        case DONE: 
-           if (poprint)            
-               fprintf (stderr, "%s\n", response);
+           if (poprint) {
+               fputs(response, stderr);
+                putc('\n', stderr);
+            }
            netsec_shutdown(nsc);
            nsc = NULL;
            return NOTOK;
@@ -592,12 +594,14 @@ vcommand (const char *fmt, va_list ap)
        case OK: 
            if (poprint)
                fprintf (stderr, "<--- %s\n", response);
-           return (*response == '+' ? OK : NOTOK);
+           return *response == '+' ? OK : NOTOK;
 
        case NOTOK: 
        case DONE: 
-           if (poprint)            
-               fprintf (stderr, "%s\n", response);
+           if (poprint) {
+               fputs(response, stderr);
+                putc('\n', stderr);
+            }
            return NOTOK;
     }