]> diplodocus.org Git - nmh/blobdiff - uip/send.c
Remove unused NCWD and NPWD #defines.
[nmh] / uip / send.c
index 03a54698ac3b6a0ccc77edced07f212442597e53..a205dfec1ffeba2db8cc83351cf4f4b9032b238a 100644 (file)
@@ -63,7 +63,6 @@
     X("snoop", 5, SNOOPSW) \
     X("sasl", SASLminc(4), SASLSW) \
     X("nosasl", SASLminc(6), NOSASLSW) \
-    X("saslmaxssf", SASLminc(6), SASLMXSSFSW) \
     X("saslmech mechanism", SASLminc(6), SASLMECHSW) \
     X("authservice", SASLminc(0), AUTHSERVICESW) \
     X("user username", SASLminc(-4), USERSW) \
@@ -268,11 +267,6 @@ main (int argc, char **argv)
                     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 == '-')
@@ -282,12 +276,16 @@ main (int argc, char **argv)
 #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 CLIESW: 
                case SERVSW: 
-               case SASLMXSSFSW:
                case PORTSW:
                case MTSSM:
                case MTSSW:
@@ -320,7 +318,7 @@ main (int argc, char **argv)
     if ((cp = context_find ("Aliasfile"))) {
        char *dp = NULL;
 
-       for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++) {
+       for (ap = brkstring(dp = mh_xstrdup(cp), " ", "\n"); ap && *ap; ap++) {
            vec[vecp++] = "-alias";
            vec[vecp++] = *ap;
        }
@@ -379,7 +377,7 @@ main (int argc, char **argv)
 
        for (msgp = 0, msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
            if (is_selected (mp, msgnum)) {
-               msgs[msgp++] = getcpy (m_name (msgnum));
+               msgs[msgp++] = mh_xstrdup(m_name (msgnum));
                unset_exists (mp, msgnum);
            }
        }
@@ -416,7 +414,7 @@ go_to_it:
            adios(NULL, "unable to create temporary file in %s",
                  get_temp_dir());
        }
-       distfile = getcpy (cp);
+       distfile = mh_xstrdup(cp);
        (void) m_unlink(distfile);
        if (link (altmsg, distfile) == NOTOK) {
            /* Cygwin with FAT32 filesystem produces EPERM. */
@@ -431,7 +429,7 @@ go_to_it:
                adios(NULL, "unable to create temporary file in %s",
                      get_temp_dir());
            }
-           distfile = getcpy (cp);
+           distfile = mh_xstrdup(cp);
            {
                int in, out;
                struct stat st;
@@ -459,13 +457,6 @@ go_to_it:
         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);
@@ -485,7 +476,7 @@ go_to_it:
     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: