diff options
| author | liuxueli <[email protected]> | 2020-06-01 17:25:41 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2020-06-01 17:25:41 +0800 |
| commit | 4490b97a7d55d1a111169f90f2b2d5046aef904d (patch) | |
| tree | 41b99d1897410c7d460c7f87e313df12eb2bcd1f | |
| parent | 86f4dc968f94482d469d8dd3b538fef85ad2441d (diff) | |
提供识别QUIC协议函数static enum _QUIC_VERSION parse_q0to43_header(struct streaminfo *pstream, struct _quic_context* _context, char *payload, int payload_len, int *used_len)
| -rw-r--r-- | src/gquic.h | 1 | ||||
| -rw-r--r-- | src/gquic_process.c | 5 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/gquic.h b/src/gquic.h index 6ed98b4..3a112ad 100644 --- a/src/gquic.h +++ b/src/gquic.h @@ -93,5 +93,6 @@ int quic_process(struct streaminfo *pstream, struct _quic_context* _context, int int quic_init_stream(void **pme, int thread_seq); // **pme=(struct _quic_context* ) void quic_release_stream(struct streaminfo *a_tcp, void **pme, int thread_seq); +static enum _QUIC_VERSION parse_q0to43_header(struct streaminfo *pstream, struct _quic_context* _context, char *payload, int payload_len, int *used_len); #endif /* SRC_GQUIC_H_ */ diff --git a/src/gquic_process.c b/src/gquic_process.c index be804e0..106d2d3 100644 --- a/src/gquic_process.c +++ b/src/gquic_process.c @@ -241,11 +241,6 @@ static enum _QUIC_VERSION parse_q0to43_header(struct streaminfo *pstream, struct char public_flags=0; struct _quic_public_header *gquic_hdr=&(_context->quic_info.quic_hdr); - if(gquic_hdr==NULL) - { - gquic_hdr=(struct _quic_public_header *)dictator_malloc(pstream->threadnum, sizeof(struct _quic_public_header)); - memset(gquic_hdr, 0, sizeof(struct _quic_public_header)); - } public_flags=payload[*used_len]; *used_len+=1; |
