@@ -703,7 +703,7 @@ void drivewireFuji::read_app_key()
703703 size_t count = fread (buffer.data (), 1 , buffer.size (), fIn );
704704 fclose (fIn );
705705 Debug_printf (" Read %d bytes from input file\n " , count);
706-
706+
707707 uint16_t sizeNetOrder = htons (count);
708708
709709 response.clear ();
@@ -909,7 +909,7 @@ void drivewireFuji::read_directory_entry()
909909 current_entry[filelen + 1 ] = ' \0 ' ;
910910 }
911911 }
912-
912+
913913 response.clear ();
914914 response.shrink_to_fit ();
915915
@@ -959,7 +959,7 @@ void drivewireFuji::close_directory()
959959 errorCode = 1 ;
960960}
961961
962- // Get network adapter configuration
962+ // Get network adapter configuration
963963void drivewireFuji::get_adapter_config ()
964964{
965965 Debug_println (" Fuji cmd: GET ADAPTER CONFIG" );
@@ -1401,7 +1401,7 @@ void drivewireFuji::base64_encode_compute()
14011401void drivewireFuji::base64_encode_length ()
14021402{
14031403 size_t l = base64.base64_buffer .length ();
1404- uint8_t o[4 ] =
1404+ uint8_t o[4 ] =
14051405 {
14061406 (uint8_t )(l >> 24 ),
14071407 (uint8_t )(l >> 16 ),
@@ -1426,7 +1426,7 @@ void drivewireFuji::base64_encode_output()
14261426 if (!len)
14271427 {
14281428 Debug_printf (" Refusing to send zero byte buffer. Exiting." );
1429- errorCode = 144 ;
1429+ errorCode = 144 ;
14301430 return ;
14311431 }
14321432
@@ -1436,7 +1436,7 @@ void drivewireFuji::base64_encode_output()
14361436 base64.base64_buffer .shrink_to_fit ();
14371437
14381438 response = std::string ((const char *)p.data (), len);
1439- errorCode = 1 ;
1439+ errorCode = 1 ;
14401440}
14411441
14421442void drivewireFuji::base64_decode_input ()
@@ -1637,6 +1637,13 @@ std::string drivewireFuji::get_host_prefix(int host_slot)
16371637 return _fnHosts[host_slot].get_prefix ();
16381638}
16391639
1640+ // Public method to update host in specific slot
1641+ fujiHost *drivewireFuji::set_slot_hostname (int host_slot, char *hostname)
1642+ {
1643+ _fnHosts[host_slot].set_hostname (hostname);
1644+ return &_fnHosts[host_slot];
1645+ }
1646+
16401647void drivewireFuji::send_error ()
16411648{
16421649 Debug_printf (" drivewireFuji::send_error(%u)\n " ,errorCode);
@@ -1662,7 +1669,7 @@ void drivewireFuji::send_response()
16621669
16631670 // Clear the response
16641671 response.clear ();
1665- response.shrink_to_fit ();
1672+ response.shrink_to_fit ();
16661673}
16671674
16681675void drivewireFuji::ready ()
@@ -1822,4 +1829,4 @@ void drivewireFuji::process()
18221829 }
18231830}
18241831
1825- #endif /* BUILD_COCO */
1832+ #endif /* BUILD_COCO */
0 commit comments