Minor fix
* mu/smtp.cÐ(com_list_param): Report if the connection has not been established yet.
Showing
1 changed file
with
8 additions
and
2 deletions
... | @@ -821,6 +821,12 @@ com_list_param (int argc, char **argv) | ... | @@ -821,6 +821,12 @@ com_list_param (int argc, char **argv) |
821 | { | 821 | { |
822 | int param, i, rc; | 822 | int param, i, rc; |
823 | const char *value; | 823 | const char *value; |
824 | |||
825 | if (!smtp) | ||
826 | { | ||
827 | mu_printf ("%s\n", _("no connection yet")); | ||
828 | return 0; | ||
829 | } | ||
824 | 830 | ||
825 | if (argc > 1) | 831 | if (argc > 1) |
826 | { | 832 | { |
... | @@ -833,7 +839,7 @@ com_list_param (int argc, char **argv) | ... | @@ -833,7 +839,7 @@ com_list_param (int argc, char **argv) |
833 | } | 839 | } |
834 | rc = mu_smtp_get_param (smtp, param, &value); | 840 | rc = mu_smtp_get_param (smtp, param, &value); |
835 | if (rc) | 841 | if (rc) |
836 | mu_diag_funcall (MU_DIAG_ERROR, "mu_smtp_set_param", argv[i], rc); | 842 | mu_diag_funcall (MU_DIAG_ERROR, "mu_smtp_get_param", argv[i], rc); |
837 | else if (value) | 843 | else if (value) |
838 | mu_printf ("%s = %s\n", argv[i], value); | 844 | mu_printf ("%s = %s\n", argv[i], value); |
839 | else | 845 | else |
... | @@ -846,7 +852,7 @@ com_list_param (int argc, char **argv) | ... | @@ -846,7 +852,7 @@ com_list_param (int argc, char **argv) |
846 | { | 852 | { |
847 | rc = mu_smtp_get_param (smtp, paramtab[i].tok, &value); | 853 | rc = mu_smtp_get_param (smtp, paramtab[i].tok, &value); |
848 | if (rc) | 854 | if (rc) |
849 | mu_diag_funcall (MU_DIAG_ERROR, "mu_smtp_set_param", | 855 | mu_diag_funcall (MU_DIAG_ERROR, "mu_smtp_get_param", |
850 | paramtab[i].name, rc); | 856 | paramtab[i].name, rc); |
851 | else if (value) | 857 | else if (value) |
852 | mu_printf ("%s = %s\n", paramtab[i].name, value); | 858 | mu_printf ("%s = %s\n", paramtab[i].name, value); | ... | ... |
-
Please register or sign in to post a comment