]> git.kaiwu.me - nginx.git/commitdiff
QUIC: fixed logging PATH_CHALLENGE/RESPONSE and build with GCC < 5.
authorSergey Kandaurov <pluknet@nginx.com>
Tue, 22 Dec 2020 09:04:15 +0000 (12:04 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Tue, 22 Dec 2020 09:04:15 +0000 (12:04 +0300)
src/event/ngx_event_quic.c

index 73519b968c8f8a9aa822aad4553d61340d21f6b6..73cde84d5ad4a3c886bd90ec211ab716e5777580 100644 (file)
@@ -589,13 +589,15 @@ ngx_quic_log_frame(ngx_log_t *log, ngx_quic_frame_t *f, ngx_uint_t tx)
         break;
 
     case NGX_QUIC_FT_PATH_CHALLENGE:
-        p = ngx_slprintf(p, last, "PATH_CHALLENGE data:0x%xL",
-                         *(uint64_t *) &f->u.path_challenge.data);
+        p = ngx_slprintf(p, last, "PATH_CHALLENGE data:0x%*xs",
+                         sizeof(f->u.path_challenge.data),
+                         f->u.path_challenge.data);
         break;
 
     case NGX_QUIC_FT_PATH_RESPONSE:
-        p = ngx_slprintf(p, last, "PATH_RESPONSE data:0x%xL",
-                         f->u.path_response);
+        p = ngx_slprintf(p, last, "PATH_RESPONSE data:0x%*xs",
+                         sizeof(f->u.path_challenge.data),
+                         f->u.path_challenge.data);
         break;
 
     case NGX_QUIC_FT_NEW_TOKEN: