> Am 10.02.2016 um 20:09 schrieb Ruediger Pluem <rpl...@apache.org>:
> 
> 
> 
> On 02/08/2016 05:50 PM, ic...@apache.org wrote:
>> [...]#ifdef HAVE_TLSEXT
>> +#ifdef HAVE_TLS_ALPN
>> +        alpn_note = apr_table_get(c->notes, "proxy-request-alpn-protos");
>> +        if (alpn_note) {
>> +            char *protos, *s, *p, *last;
>> +            apr_size_t len;
>> +            
>> +            s = protos = apr_pcalloc(c->pool, strlen(alpn_note)+1);
>> +            p = apr_pstrdup(c->pool, alpn_note);
>> +            while ((p = apr_strtok(p, ", ", &last))) {
>> +                len = last - p - (*last? 1 : 0); 
>> +                if (len > 255) {
>> +                    ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO()
>> +                                  "ALPN proxy protocol identifier too long: 
>> %s",
>> +                                  p);
>> +                    ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, server);
>> +                    return APR_EGENERAL;
>> +                }
>> +                *s++ = (unsigned char)len;
>> +                while (len--) {
>> +                    *s++ = *p++;
>> +                }
>> +                p = last;
> 
> Why not p = NULL as it should be for subsequent calls of apr_strtok?

Matter of taste. If code is more readable to everyone using NULL, that is fine 
with me.

Changed in r1729782.

Stefan

Reply via email to