comparison src/event/ngx_event_quic_transport.c @ 8344:e0abe17a2878 quic

Removed source/destination swap from the function creating header. The function now creates a header according to fileds provided in the "pkt" argument without applying any logic regarding sending side.
author Vladimir Homutov <vl@nginx.com>
date Mon, 20 Apr 2020 12:12:17 +0300
parents 76e8ec502c69
children dd84c9cef75b
comparison
equal deleted inserted replaced
8343:de715cdd4257 8344:e0abe17a2878
363 363
364 *p++ = pkt->flags; 364 *p++ = pkt->flags;
365 365
366 p = ngx_quic_write_uint32(p, NGX_QUIC_VERSION); 366 p = ngx_quic_write_uint32(p, NGX_QUIC_VERSION);
367 367
368 *p++ = pkt->dcid.len;
369 p = ngx_cpymem(p, pkt->dcid.data, pkt->dcid.len);
370
368 *p++ = pkt->scid.len; 371 *p++ = pkt->scid.len;
369 p = ngx_cpymem(p, pkt->scid.data, pkt->scid.len); 372 p = ngx_cpymem(p, pkt->scid.data, pkt->scid.len);
370
371 *p++ = pkt->dcid.len;
372 p = ngx_cpymem(p, pkt->dcid.data, pkt->dcid.len);
373 373
374 if (pkt->level == ssl_encryption_initial) { 374 if (pkt->level == ssl_encryption_initial) {
375 ngx_quic_build_int(&p, pkt->token.len); 375 ngx_quic_build_int(&p, pkt->token.len);
376 } 376 }
377 377
406 406
407 p = start = out; 407 p = start = out;
408 408
409 *p++ = pkt->flags; 409 *p++ = pkt->flags;
410 410
411 p = ngx_cpymem(p, pkt->scid.data, pkt->scid.len); 411 p = ngx_cpymem(p, pkt->dcid.data, pkt->dcid.len);
412 412
413 *pnp = p; 413 *pnp = p;
414 414
415 switch (pkt->num_len) { 415 switch (pkt->num_len) {
416 case 1: 416 case 1: