@@ -517,12 +517,15 @@ static int tls_cred_cmd_add(const struct shell *sh, size_t argc, char *argv[])
517517
518518#define ASCII_CTRL_C 0x03
519519
520- static void tls_cred_cmd_load_bypass (const struct shell * sh , uint8_t * data , size_t len )
520+ static void tls_cred_cmd_load_bypass (const struct shell * sh , uint8_t * data , size_t len ,
521+ void * user_data )
521522{
522523 bool terminate = false;
523524 int res ;
524525 size_t write_len = len ;
525526
527+ ARG_UNUSED (user_data );
528+
526529 for (size_t i = 0 ; i < len ; i ++ ) {
527530 if (data [i ] == ASCII_CTRL_C ) {
528531 write_len = i ;
@@ -533,7 +536,7 @@ static void tls_cred_cmd_load_bypass(const struct shell *sh, uint8_t *data, size
533536
534537 res = cred_buf_write (data , write_len );
535538 if (res == - ENOMEM ) {
536- shell_set_bypass (sh , NULL );
539+ shell_set_bypass (sh , NULL , NULL );
537540 shell_fprintf (sh , SHELL_ERROR , "Not enough room in credential buffer for "
538541 "provided data. Increase "
539542 "CONFIG_TLS_CREDENTIALS_SHELL_CRED_BUF_SIZE.\n" );
@@ -542,7 +545,7 @@ static void tls_cred_cmd_load_bypass(const struct shell *sh, uint8_t *data, size
542545 }
543546
544547 if (terminate ) {
545- shell_set_bypass (sh , NULL );
548+ shell_set_bypass (sh , NULL , NULL );
546549 shell_fprintf (sh , SHELL_NORMAL , "Stored %d bytes.\n" , cred_written );
547550 }
548551}
@@ -561,7 +564,7 @@ static int tls_cred_cmd_buf_load(const struct shell *sh, size_t argc, char *argv
561564 shell_clear_cred_buf (sh );
562565
563566 shell_fprintf (sh , SHELL_NORMAL , "Input credential, finish with CTRL+C.\n" );
564- shell_set_bypass (sh , tls_cred_cmd_load_bypass );
567+ shell_set_bypass (sh , tls_cred_cmd_load_bypass , NULL );
565568 return 0 ;
566569}
567570
0 commit comments