Open davisouzaluna opened 3 weeks ago
If I try to create a new client and set a value, it cannot access the memory space. But if it already exists, it can do it. Think about logic
Works:
client_t client; client_config_t config; size_t buffer_size = 0; char *client_id = "test_client_struct"; config.client_id = client_id; config.keep_alive = 60; config.ip_broker = global_ip_broker; config.port_broker = global_port_broker; config.default_qos = 0;
create_client(&client, &config, buffer_size);
- Don't work: ```c client_t client; client_config_t config; size_t buffer_size = 0; char *client_id = "test_client_struct"; set_client_id(&client, "test_client_struct"); printf("debug\n"); set_keep_alive(&client, 60); set_broker_ip(&client, global_ip_broker); set_broker_port(&client, global_port_broker); set_config(&client, &config); create_client(&client, &config, buffer_size);
Segmentation fault
commit 138217ac5dbb50d46b1cb021a6a53d122692312e
If I try to create a new client and set a value, it cannot access the memory space. But if it already exists, it can do it. Think about logic
Create New client
Works:
create_client(&client, &config, buffer_size);
Return error: