In function 'esp_err_t echo_handler(httpd_req_t*)':
src/main.cpp:245:44: error: expression list treated as compound expression in functional cast [-fpermissive]
transfer_complete_cb(ret, socketID, msg);
in the esp_htp_sever.h there is a callback prototype
Code: Select all
typedef void (*transfer_complete_cb)(esp_err_t err, int socket, void *arg);
Code: Select all
char msg[20] = "transfer complete";
transfer_complete(ret, socketID, msg);
Code: Select all
void transfer_complete(esp_err_t err, int socket, void *arg)
{
char *myMsg = (char *)arg;
log_i("transfer complete skt %d, arg %s with error %d", socket, myMsg, err);
return;
}
sometimes the callback is registered like in events but mostly nothing special is done just drop the typedef and the * and change
the name of the function and it works but not in this case.