@@ -437,38 +437,52 @@ xqc_engine_create(xqc_engine_type_t engine_type,
437
437
engine -> config -> cfg_log_event ,
438
438
engine -> config -> cfg_log_timestamp ,
439
439
engine -> config -> cfg_log_level_name ,
440
- & engine -> eng_callback .log_callbacks , engine -> user_data );
440
+ & engine -> eng_callback .log_callbacks ,
441
+ engine -> user_data );
442
+
441
443
if (engine -> log == NULL ) {
442
444
goto fail ;
443
445
}
444
446
445
447
engine -> rand_generator = xqc_random_generator_create (engine -> log );
446
448
if (engine -> rand_generator == NULL ) {
449
+ xqc_log (engine -> log , XQC_LOG_ERROR ,
450
+ "|unable to initialize random generator in engine|" );
447
451
goto fail ;
448
452
}
449
453
450
454
engine -> conns_hash = xqc_engine_conns_hash_create (engine -> config );
451
455
if (engine -> conns_hash == NULL ) {
456
+ xqc_log (engine -> log , XQC_LOG_ERROR ,
457
+ "|unable to create connections hash|" );
452
458
goto fail ;
453
459
}
454
460
455
461
engine -> conns_hash_dcid = xqc_engine_conns_hash_create (engine -> config );
456
462
if (engine -> conns_hash_dcid == NULL ) {
463
+ xqc_log (engine -> log , XQC_LOG_ERROR ,
464
+ "|unable to create connections hash for reset packets|" );
457
465
goto fail ;
458
466
}
459
467
460
468
engine -> conns_hash_sr_token = xqc_engine_conns_hash_create (engine -> config );
461
469
if (engine -> conns_hash_sr_token == NULL ) {
470
+ xqc_log (engine -> log , XQC_LOG_ERROR ,
471
+ "|unable to create connections hash for stateless reset|" );
462
472
goto fail ;
463
473
}
464
474
465
475
engine -> conns_active_pq = xqc_engine_conns_pq_create (engine -> config );
466
476
if (engine -> conns_active_pq == NULL ) {
477
+ xqc_log (engine -> log , XQC_LOG_ERROR ,
478
+ "|unable to create priority queue|" );
467
479
goto fail ;
468
480
}
469
481
470
482
engine -> conns_wait_wakeup_pq = xqc_engine_wakeup_pq_create (engine -> config );
471
483
if (engine -> conns_wait_wakeup_pq == NULL ) {
484
+ xqc_log (engine -> log , XQC_LOG_ERROR ,
485
+ "|unable to create wakeup priority queue|" );
472
486
goto fail ;
473
487
}
474
488
@@ -477,11 +491,12 @@ xqc_engine_create(xqc_engine_type_t engine_type,
477
491
engine -> tls_ctx = xqc_tls_ctx_create ((xqc_tls_type_t )engine -> eng_type , ssl_config ,
478
492
& xqc_conn_tls_cbs , engine -> log );
479
493
if (NULL == engine -> tls_ctx ) {
480
- xqc_log (engine -> log , XQC_LOG_ERROR , "|create tls context error" );
494
+ xqc_log (engine -> log , XQC_LOG_ERROR , "|create tls context error| " );
481
495
goto fail ;
482
496
}
483
497
484
498
} else {
499
+ xqc_log (engine -> log , XQC_LOG_ERROR , "|invalid SSL configuration|" );
485
500
goto fail ;
486
501
}
487
502
@@ -1321,12 +1336,6 @@ xqc_engine_packet_process(xqc_engine_t *engine,
1321
1336
}
1322
1337
1323
1338
1324
-
1325
-
1326
-
1327
-
1328
-
1329
-
1330
1339
uint8_t
1331
1340
xqc_engine_config_get_cid_len (xqc_engine_t * engine )
1332
1341
{
0 commit comments