Skip to content

Commit

Permalink
[+] add log
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanmei-Liu committed Oct 27, 2023
1 parent 3197698 commit aec0987
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 8 additions & 4 deletions demo/demo_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ typedef struct xqc_demo_cli_quic_config_s {

uint8_t mp_version;

uint8_t path_standby;
uint8_t test_path_status;

} xqc_demo_cli_quic_config_t;

Expand Down Expand Up @@ -1936,8 +1936,8 @@ xqc_demo_cli_parse_args(int argc, char *argv[], xqc_demo_cli_client_args_t *args
break;

case 'B':
printf("option multipath set path standby: %s\n", optarg);
args->quic_cfg.path_standby = atoi(optarg);
printf("option multipath set path status: %s\n", optarg);
args->quic_cfg.test_path_status = 1;
break;

case 'I':
Expand Down Expand Up @@ -2201,6 +2201,7 @@ xqc_demo_cli_h3_conn_handshake_finished(xqc_h3_conn_t *h3_conn, void *user_data)

if (user_conn->send_path_available) {
/* set initial path available here */
xqc_conn_mark_path_standby(user_conn->ctx->engine, &user_conn->cid, 0);
xqc_conn_mark_path_available(user_conn->ctx->engine, &user_conn->cid, 0);
}

Expand Down Expand Up @@ -2388,7 +2389,10 @@ xqc_demo_cli_init_xquic_connection(xqc_demo_cli_user_conn_t *user_conn,
}
}

if (conn_settings.enable_multipath && conn_settings.multipath_version >= XQC_MULTIPATH_06) {
if (conn_settings.enable_multipath
&& conn_settings.multipath_version >= XQC_MULTIPATH_06
&& args->quic_cfg.test_path_status == 1)
{
user_conn->send_path_available = 1;
}

Expand Down
2 changes: 2 additions & 0 deletions src/transport/xqc_packet_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,8 @@ xqc_write_path_standby_or_available_frame_to_packet(xqc_connection_t *conn, xqc_
packet_out->po_used_size += ret;
xqc_send_queue_move_to_high_pri(&packet_out->po_list, conn->conn_send_queue);

xqc_log(conn->log, XQC_LOG_DEBUG, "|xqc_write_path_standby_or_available_frame_to_packet|status=%d|", path->app_path_status);

return XQC_OK;

error:
Expand Down

0 comments on commit aec0987

Please sign in to comment.