]> diplodocus.org Git - nmh/blobdiff - uip/send.c
Added 2 second timeout to curl command in post() in oauth.c, for
[nmh] / uip / send.c
index 03a54698ac3b6a0ccc77edced07f212442597e53..5dcdce0ef6ce88a42fa9ae5000403198be017054 100644 (file)
@@ -268,11 +268,6 @@ main (int argc, char **argv)
                     user = cp;
                    continue;
 
                     user = cp;
                    continue;
 
-               case SASLMECHSW:
-                   if (!(saslmech = *argp++) || *saslmech == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
-                   continue;
-
                case AUTHSERVICESW:
 #ifdef OAUTH_SUPPORT
                    if (!(auth_svc = *argp++) || *auth_svc == '-')
                case AUTHSERVICESW:
 #ifdef OAUTH_SUPPORT
                    if (!(auth_svc = *argp++) || *auth_svc == '-')
@@ -282,6 +277,11 @@ main (int argc, char **argv)
 #endif
                    continue;
 
 #endif
                    continue;
 
+               case SASLMECHSW:
+                   if (!(saslmech = *argp) || *saslmech == '-')
+                       adios (NULL, "missing argument to %s", argp[-2]);
+                   /* Fall through */
+
                case ALIASW: 
                case FILTSW: 
                case WIDTHSW: 
                case ALIASW: 
                case FILTSW: 
                case WIDTHSW: 
@@ -459,13 +459,6 @@ go_to_it:
         if (user == NULL) {
             adios (NULL, "must specify -user with -saslmech xoauth2");
         }
         if (user == NULL) {
             adios (NULL, "must specify -user with -saslmech xoauth2");
         }
-
-        vec[vecp++] = "-authservice";
-        if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
-            vec[vecp++] = mh_oauth_do_xoauth (user, auth_svc, snoop ? stderr : NULL);
-        } else {
-            vec[vecp++] = auth_svc;
-        }
     }
 #else
     NMH_UNUSED(auth_svc);
     }
 #else
     NMH_UNUSED(auth_svc);
@@ -485,7 +478,7 @@ go_to_it:
     closefds (3);
 
     for (msgnum = 0; msgnum < msgp; msgnum++) {
     closefds (3);
 
     for (msgnum = 0; msgnum < msgp; msgnum++) {
-       switch (sendsbr (vec, vecp, program, msgs[msgnum], &st, 1)) {
+       switch (sendsbr (vec, vecp, program, msgs[msgnum], &st, 1, auth_svc)) {
            case DONE: 
                done (++status);
            case NOTOK: 
            case DONE: 
                done (++status);
            case NOTOK: