]> diplodocus.org Git - nmh/blobdiff - uip/sendsbr.c
Fix some typos in the comments.
[nmh] / uip / sendsbr.c
index e55361c8d98320e6befcc7bc4e7cb3d6ddc170d3..74f7dae5c6787ffddf56cf513cfaced61b8a2a02 100644 (file)
@@ -88,7 +88,7 @@ sendsbr (char **vec, int vecp, char *program, char *draft, struct stat *st,
        break;
 
     case OK:
-       buildvec = argsplit(buildmimeproc, &buildprogram, &i);
+        buildvec = argsplit(buildmimeproc, &buildprogram, &i);
        buildvec[i++] = "-auto";
        if (distfile)
            buildvec[i++] = "-dist";
@@ -129,10 +129,15 @@ sendsbr (char **vec, int vecp, char *program, char *draft, struct stat *st,
         */
 
        if (auth_svc) {
+#ifdef OAUTH_SUPPORT
                const char *errmsg;
                if (setup_oauth_params(vec, nvecsp, auth_svc, &errmsg) != OK) {
                        adios(NULL, errmsg);
                }
+#else
+                adios(NULL, "send built without OAUTH_SUPPORT, "
+                      "so auth_svc %s is not supported", auth_svc);
+#endif /* OAUTH_SUPPORT */
        }
 
         /*
@@ -765,7 +770,8 @@ handle_sendfrom(char **vec, int *vecp, char *draft, const char *auth_svc) {
                 }
                 break;
 #else
-                adios(NULL, "sendfrom built without OAUTH_SUPPORT, "
+                NMH_UNUSED(auth_svc);
+                adios(NULL, "send built without OAUTH_SUPPORT, "
                       "so -saslmech xoauth2 is not supported");
 #endif /* OAUTH_SUPPORT */
             }
@@ -815,7 +821,9 @@ setup_oauth_params(char *vec[], int *vecp, const char *auth_svc,
                                            sizeof(errbuf)))
                adios(NULL, "Unable to retrieve oauth profile entries: %s",
                      errbuf);
-           
+
+           vec[(*vecp)++] = getcpy("-authservice");
+           vec[(*vecp)++] = getcpy(auth_svc);
            vec[(*vecp)++] = getcpy("-oauthcredfile");
            vec[(*vecp)++] = getcpy(mh_oauth_cred_fn(auth_svc));
            vec[(*vecp)++] = getcpy("-oauthclientid");