First Ethernet activation
This commit is contained in:
		@@ -6,8 +6,12 @@
 | 
			
		||||
#include "constants.h"
 | 
			
		||||
#include "string.h"
 | 
			
		||||
 | 
			
		||||
#include "esp_log.h"
 | 
			
		||||
 | 
			
		||||
#define DEV_PREFIX "ESP32 "
 | 
			
		||||
 | 
			
		||||
static const char *TAG = "dev_name";
 | 
			
		||||
 | 
			
		||||
bool dev_generate_name()
 | 
			
		||||
{
 | 
			
		||||
    // Check if a device name has already been defined
 | 
			
		||||
@@ -29,7 +33,7 @@ char *dev_name()
 | 
			
		||||
    char *dev = malloc(len + strlen(DEV_PREFIX) + 1);
 | 
			
		||||
    if (dev == NULL)
 | 
			
		||||
    {
 | 
			
		||||
        printf("Failed to allocate memory to store dev name!\n");
 | 
			
		||||
        ESP_LOGE(TAG, "Failed to allocate memory to store dev name!\n");
 | 
			
		||||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user