TFTP
Change init to make it more readable
This commit is contained in:
@@ -279,10 +279,11 @@ struct tftp_context tftpContext_s = {.open = tftp_open, .close = tftp_close, .re
|
||||
*/
|
||||
void tftp_server_init(void) {
|
||||
LOG_INFO(TAG, "Initializing tftp server");
|
||||
// init the index.txt virt_file
|
||||
init_index();
|
||||
|
||||
LOG_DEBUG(TAG, "index.txt: %s", virt_file[VIRT_INDEX_TXT].data);
|
||||
// init the virtImage.raw virt_file with 80kb of ram
|
||||
|
||||
// init the virtImage virt_file with 80kb of ram
|
||||
virt_file[VIRT_IMAGE_BMP].data = calloc(IMAGE_BUFFER_SIZE, sizeof(char));
|
||||
if (virt_file[VIRT_IMAGE_BMP].data == NULL) {
|
||||
LOG_FATAL(TAG, "Could not allocate memory for virtImage.bmp/virtImage.gif");
|
||||
|
||||
Reference in New Issue
Block a user