X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=imap-send.c;h=834301cf409c311d47b22a0f7504917a32847647;hb=bb96a2c9005f925b4e80ece0a7cd6230f7f4b43d;hp=69e614245681e86c56a50cd096a675e8dc96deec;hpb=d23b1ecf11ee48cd9e266ada06f1b8298b917e92;p=git.git diff --git a/imap-send.c b/imap-send.c index 69e614245..834301cf4 100644 --- a/imap-send.c +++ b/imap-send.c @@ -94,6 +94,8 @@ struct msg_data { unsigned int crlf:1; }; +static const char imap_send_usage[] = "git imap-send < "; + #undef DRV_OK #define DRV_OK 0 #define DRV_MSG_BAD -1 @@ -271,8 +273,12 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve #ifdef NO_OPENSSL fprintf(stderr, "SSL requested but SSL support not compiled in\n"); return -1; +#else +#if (OPENSSL_VERSION_NUMBER >= 0x10000000L) + const SSL_METHOD *meth; #else SSL_METHOD *meth; +#endif SSL_CTX *ctx; int ret; @@ -1366,6 +1372,9 @@ int main(int argc, char **argv) git_extract_argv0_path(argv[0]); + if (argc != 1) + usage(imap_send_usage); + setup_git_directory_gently(&nongit_ok); git_config(git_imap_config, NULL);