]> diplodocus.org Git - nmh/blobdiff - uip/msgchk.c
Use HasPrefix() instead of strncmp().
[nmh] / uip / msgchk.c
index d7b2c2f04394497dfc6b98970f5ab3ae822638a9..a4613c27dab71d1189b741c22e1d4b98c33a57c6 100644 (file)
@@ -336,7 +336,7 @@ checkmail (char *user, char *home, int datesw, int notifysw, int personal)
        if (datesw && st.st_atime)
            printf ("; last read on %s", dtime (&st.st_atime, 1));
     if (notifysw)
        if (datesw && st.st_atime)
            printf ("; last read on %s", dtime (&st.st_atime, 1));
     if (notifysw)
-       printf ("\n");
+       putchar('\n');
 
     return status;
 }
 
     return status;
 }
@@ -350,23 +350,20 @@ remotemail (char *host, char *port, char *user, char *proxy, int notifysw,
            const char *auth_svc)
 {
     int nmsgs, nbytes, status;
            const char *auth_svc)
 {
     int nmsgs, nbytes, status;
-    struct nmh_creds creds = { 0, 0, 0 };
 
     if (auth_svc == NULL) {
        if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
            adios (NULL, "must specify -authservice with -saslmech xoauth2");
        }
 
     if (auth_svc == NULL) {
        if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
            adios (NULL, "must specify -authservice with -saslmech xoauth2");
        }
-       nmh_get_credentials (host, user, sasl, &creds);
     } else {
        if (user == NULL) {
            adios (NULL, "must specify -user with -saslmech xoauth2");
        }
     } else {
        if (user == NULL) {
            adios (NULL, "must specify -user with -saslmech xoauth2");
        }
-       creds.user = user;
     }
 
     /* open the POP connection */
     }
 
     /* open the POP connection */
-    if (pop_init (host, port, creds.user, creds.password, proxy, snoop, sasl,
-                 saslmech, tls, auth_svc) == NOTOK
+    if (pop_init (host, port, user, proxy, snoop, sasl, saslmech, tls,
+                 auth_svc) == NOTOK
            || pop_stat (&nmsgs, &nbytes) == NOTOK     /* check for messages  */
            || pop_quit () == NOTOK) {                 /* quit POP connection */
        advise (NULL, "%s", response);
            || pop_stat (&nmsgs, &nbytes) == NOTOK     /* check for messages  */
            || pop_quit () == NOTOK) {                 /* quit POP connection */
        advise (NULL, "%s", response);