Skip to content

Commit

Permalink
[!] fix crash on ubuntu 32 (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kulsk authored Jan 16, 2024
1 parent e9e1195 commit f3cab88
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion demo/demo_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ xqc_demo_svr_init_conn_settings(xqc_demo_svr_args_t *args)
break;
}

xqc_scheduler_callback_t sched;
xqc_scheduler_callback_t sched = {0};
if (strncmp(args->quic_cfg.mp_sched, "minrtt", strlen("minrtt")) == 0) {
sched = xqc_minrtt_scheduler_cb;

Expand Down
25 changes: 13 additions & 12 deletions src/common/xqc_log_event_callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void
xqc_log_TRA_PACKET_RECEIVED_callback(xqc_log_t *log, const char *func, xqc_packet_in_t *packet_in)
{
xqc_log_implement(log, TRA_PACKET_RECEIVED, func,
"|pkt_pns:%d|pkt_type:%d|pkt_num:%d|len:%d|frame_flag:%s|",
"|pkt_pns:%d|pkt_type:%d|pkt_num:%ui|len:%uz|frame_flag:%s|",
packet_in->pi_pkt.pkt_pns, packet_in->pi_pkt.pkt_type, packet_in->pi_pkt.pkt_num,
packet_in->buf_size, xqc_frame_type_2_str(packet_in->pi_frame_types));
}
Expand All @@ -149,7 +149,7 @@ void
xqc_log_TRA_PACKET_SENT_callback(xqc_log_t *log, const char *func, xqc_packet_out_t *packet_out)
{
xqc_log_implement(log, TRA_PACKET_SENT, func,
"|pkt_pns:%d|pkt_type:%d|pkt_num:%d|size:%d|frame_flag:%s|",
"|pkt_pns:%d|pkt_type:%d|pkt_num:%ui|size:%d|frame_flag:%s|",
packet_out->po_pkt.pkt_pns, packet_out->po_pkt.pkt_type, packet_out->po_pkt.pkt_num,
packet_out->po_used_size, xqc_frame_type_2_str(packet_out->po_frame_types));
}
Expand All @@ -175,7 +175,7 @@ void
xqc_log_TRA_DATAGRAMS_SENT_callback(xqc_log_t *log, const char *func, ssize_t size)
{
xqc_log_implement(log, TRA_DATAGRAMS_SENT, func,
"|size:%d|", size);
"|size:%z|", size);
}

void
Expand Down Expand Up @@ -671,20 +671,21 @@ xqc_log_QPACK_INSTRUCTION_CREATED_callback(xqc_log_t *log, const char *func, ...
break;
}
case XQC_INS_TYPE_ENC_INSERT_NAME_REF: {
xqc_int_t table_type = va_arg(args, xqc_int_t);
uint64_t name_index = va_arg(args, uint64_t);
uint64_t value_len = va_arg(args, uint64_t);
char *value = va_arg(args, char *);
xqc_flag_t table_type = va_arg(args, xqc_flag_t);
uint64_t name_index = va_arg(args, uint64_t);
size_t value_len = va_arg(args, size_t);
char *value = va_arg(args, char *);
xqc_log_implement(log, QPACK_INSTRUCTION_CREATED, func,
"|insert_with_name_reference|%s|name_index:%ui|value:%*s|",
table_type == XQC_DTABLE_FLAG ? "dtable" : "stable", name_index, (size_t) value_len, value);
table_type == XQC_DTABLE_FLAG ? "dtable" : "stable",
name_index, (size_t) value_len, value);
break;
}
case XQC_INS_TYPE_ENC_INSERT_LITERAL: {
uint64_t name_len = va_arg(args, uint64_t);
char *name = va_arg(args, char *);
uint64_t value_len = va_arg(args, uint64_t);
char *value = va_arg(args, char *);
size_t name_len = va_arg(args, size_t);
char *name = va_arg(args, char *);
size_t value_len = va_arg(args, size_t);
char *value = va_arg(args, char *);
xqc_log_implement(log, QPACK_INSTRUCTION_CREATED, func,
"|insert_without_name_reference|name:%*s|value:%*s|",
(size_t) name_len, name, (size_t) value_len, value);
Expand Down
2 changes: 1 addition & 1 deletion src/transport/xqc_send_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ xqc_send_ctl_on_ack_received(xqc_send_ctl_t *send_ctl, xqc_pn_ctl_t *pn_ctl, xqc
xqc_log(conn->log, XQC_LOG_DEBUG,
"|conn:%p|path:%ui|pkt_num:%ui|origin_pktnum:%ui|size:%ud|pns:%d|pkt_type:%s|frame:%s|conn_state:%s|frame_largest_ack:%ui|path_largest_ack:%ui|",
conn, send_ctl->ctl_path->path_id, packet_out->po_pkt.pkt_num,
(xqc_packet_number_t)packet_out->po_origin ? packet_out->po_origin->po_pkt.pkt_num : 0,
(xqc_packet_number_t)(packet_out->po_origin ? packet_out->po_origin->po_pkt.pkt_num : 0),
packet_out->po_used_size, pns,
xqc_pkt_type_2_str(packet_out->po_pkt.pkt_type),
xqc_frame_type_2_str(packet_out->po_frame_types),
Expand Down
2 changes: 1 addition & 1 deletion src/transport/xqc_send_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ xqc_send_queue_drop_packets_with_type(xqc_send_ctl_t *send_ctl, xqc_send_queue_t
xqc_send_queue_insert_free(packet_out, &send_queue->sndq_free_packets, send_queue);


xqc_log(send_ctl->ctl_conn->log, XQC_LOG_DEBUG, "|drop pkt from unacked|inflight:%ui|cwnd:%ui|"
xqc_log(send_ctl->ctl_conn->log, XQC_LOG_DEBUG, "|drop pkt from unacked|inflight:%ud|cwnd:%ui|"
"pkt_num:%ui|ptype:%d|frames:%s|", send_ctl->ctl_bytes_in_flight,
send_ctl->ctl_cong_callback->xqc_cong_ctl_get_cwnd(send_ctl->ctl_cong), packet_out->po_pkt.pkt_num,
packet_out->po_pkt.pkt_type, xqc_frame_type_2_str(packet_out->po_frame_types));
Expand Down

0 comments on commit f3cab88

Please sign in to comment.