You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Yann Ylavic <yl...@gmail.com> on 2014/07/08 14:00:55 UTC

Re: svn commit: r1608703 - /httpd/httpd/trunk/server/listen.c

On Tue, Jul 8, 2014 at 11:42 AM,  <jk...@apache.org> wrote:
>
> @@ -279,8 +279,35 @@ static apr_status_t close_listeners_on_e
>
>  #ifdef HAVE_SYSTEMD
>
> +static int find_systemd_socket(process_rec * process, apr_port_t port) {
> +    int fdcount, fd;
> +    int sdc = sd_listen_fds(0);
> +
> +    if (sdc < 0) {
> +        ap_log_perror(APLOG_MARK, APLOG_CRIT, sdc, process->pool, APLOGNO(02486)
> +                      "find_systemd_socket: Error parsing enviroment, sd_listen_fds returned %d",
> +                      sdc);
> +        return 1;
> +    }
> +
> +    if (sdc == 0) {
> +        ap_log_perror(APLOG_MARK, APLOG_CRIT, sdc, process->pool, APLOGNO(02487)
> +                      "find_systemd_socket: At least one socket must be set.");
> +        return 1;
> +    }

Shouldn't these returns be -1?

Re: svn commit: r1608703 - /httpd/httpd/trunk/server/listen.c

Posted by Jan Kaluža <jk...@redhat.com>.
On 07/08/2014 02:00 PM, Yann Ylavic wrote:
> On Tue, Jul 8, 2014 at 11:42 AM,  <jk...@apache.org> wrote:
>>
>> @@ -279,8 +279,35 @@ static apr_status_t close_listeners_on_e
>>
>>   #ifdef HAVE_SYSTEMD
>>
>> +static int find_systemd_socket(process_rec * process, apr_port_t port) {
>> +    int fdcount, fd;
>> +    int sdc = sd_listen_fds(0);
>> +
>> +    if (sdc < 0) {
>> +        ap_log_perror(APLOG_MARK, APLOG_CRIT, sdc, process->pool, APLOGNO(02486)
>> +                      "find_systemd_socket: Error parsing enviroment, sd_listen_fds returned %d",
>> +                      sdc);
>> +        return 1;
>> +    }
>> +
>> +    if (sdc == 0) {
>> +        ap_log_perror(APLOG_MARK, APLOG_CRIT, sdc, process->pool, APLOGNO(02487)
>> +                      "find_systemd_socket: At least one socket must be set.");
>> +        return 1;
>> +    }
>
> Shouldn't these returns be -1?
>

Yes, good catch, thanks. Fixed in r1608744.

Jan Kaluza