set_owner_details returns an error code not 0 or 1

This commit is contained in:
joran2738
2023-11-25 15:16:09 +01:00
parent 9bec13a217
commit a73080b1fc
2 changed files with 8 additions and 8 deletions

View File

@@ -59,7 +59,7 @@ void main(void){
LOG_WARN(TAG,"error initializing udp connection, trying again in 500ms");
HAL_Delay(500);
if(udp_broadcast_connection_init() != ERR_OK){
LOG_WARN(TAG,"error initializing udp connection, check warnings from udp_broadcast_init() or udp_broadcast_connection_init()");
LOG_WARN(TAG,"error initializing udp connection, check warnings from udp_broadcast_init() or udp_broadcast_connection_init()");
}
connected:
@@ -82,9 +82,9 @@ THe 'udp_broadcast_set_owner_details(const char* , const char*)' function does 2
void main(void){
...
if (!udp_broadcast_set_owner_details("Joran", "Van Nieuwenhoven")){
...
}
if (udp_broadcast_set_owner_details("Joran", "Van Nieuwenhoven") != ERR_OK){
...
}
...
}
```
@@ -106,11 +106,11 @@ void main(void){
char surname[20];
char reply[120];
strncp(name,udp_broadcast_get_owner_details_name(),sizeof(name));
strncp(name, udp_broadcast_get_owner_details_name(), sizeof(name) - 1);
strncp(surname,udp_broadcast_get_owner_details_surname(),sizeof(surname));
strncp(surname, udp_broadcast_get_owner_details_surname(), sizeof(surname) - 1);
strncp(reply,udp_broadcast_get_owner_details_reply(),sizeof(reply));
strncp(reply, udp_broadcast_get_owner_details_reply(), sizeof(reply) - 1);
...
}
```