public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: Fabian Ebner <f.ebner@proxmox.com>
Cc: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied: [PATCH pmg-api] api: upload costum certificate: actually return info
Date: Wed, 28 Apr 2021 11:13:23 +0200	[thread overview]
Message-ID: <20210428111323.1b419787@rosa.proxmox.com> (raw)
In-Reply-To: <20210428082250.30795-1-f.ebner@proxmox.com>

On Wed, 28 Apr 2021 10:22:50 +0200
Fabian Ebner <f.ebner@proxmox.com> wrote:

> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
>  src/PMG/API2/Certificates.pm | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/src/PMG/API2/Certificates.pm b/src/PMG/API2/Certificates.pm
> index c08deb6..1db4a90 100644
> --- a/src/PMG/API2/Certificates.pm
> +++ b/src/PMG/API2/Certificates.pm
> @@ -57,11 +57,13 @@ my sub update_cert : prototype($$$$$) {
>      my ($type, $cert_path, $certificate, $force, $restart) = @_;
>      my $code = sub {
>  	print "Setting custom certificate file $cert_path\n";
> -	PMG::CertHelpers::set_cert_file($certificate, $cert_path, $force);
> +	my $info = PMG::CertHelpers::set_cert_file($certificate, $cert_path, $force);
>  
>  	restart_after_cert_update($type) if $restart;
> +
> +	return $info;
>      };
> -    PMG::CertHelpers::cert_lock(10, $code);
> +    return PMG::CertHelpers::cert_lock(10, $code);
>  };
>  
>  my sub set_smtp : prototype($$) {
> @@ -250,7 +252,7 @@ __PACKAGE__->register_method ({
>  	my $info;
>  
>  	PMG::CertHelpers::cert_lock(10, sub {
> -	    update_cert($type, $cert_path, $certs, $param->{force}, $param->{restart});
> +	    $info = update_cert($type, $cert_path, $certs, $param->{force}, $param->{restart});
>  	});
>  
>  	if ($type eq 'smtp') {

Huge thanks for tracking this down and providing the patch!!
gave it a quick spin and applied it





      reply	other threads:[~2021-04-28  9:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28  8:22 [pmg-devel] " Fabian Ebner
2021-04-28  9:13 ` Stoiko Ivanov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210428111323.1b419787@rosa.proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=f.ebner@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal