@@ -81,30 +81,20 @@ static int mdns_test_service_txt_set(const char *service, const char *proto, ui
8181static int mdns_test_sub_service_add (const char * sub_name , const char * service_name , const char * proto , uint32_t port )
8282{
8383 if (mdns_service_add (NULL , service_name , proto , port , NULL , 0 )) {
84- // This is expected failure as the service thread is not running
84+ return ESP_FAIL ;
8585 }
86- mdns_action_t * a = NULL ;
87- GetLastItem (& a );
88- mdns_test_execute_action (a );
8986
9087 if (_mdns_get_service_item (service_name , proto , NULL ) == NULL ) {
9188 return ESP_FAIL ;
9289 }
93- int ret = mdns_service_subtype_add_for_host (NULL , service_name , proto , NULL , sub_name );
94- a = NULL ;
95- GetLastItem (& a );
96- mdns_test_execute_action (a );
97- return ret ;
90+ return mdns_service_subtype_add_for_host (NULL , service_name , proto , NULL , sub_name );
9891}
9992
10093static int mdns_test_service_add (const char * service_name , const char * proto , uint32_t port )
10194{
10295 if (mdns_service_add (NULL , service_name , proto , port , NULL , 0 )) {
103- // This is expected failure as the service thread is not running
96+ return ESP_FAIL ;
10497 }
105- mdns_action_t * a = NULL ;
106- GetLastItem (& a );
107- mdns_test_execute_action (a );
10898
10999 if (_mdns_get_service_item (service_name , proto , NULL ) == NULL ) {
110100 return ESP_FAIL ;
@@ -270,9 +260,6 @@ int main(int argc, char **argv)
270260 }
271261#ifndef MDNS_NO_SERVICES
272262 mdns_service_remove_all ();
273- mdns_action_t * a = NULL ;
274- GetLastItem (& a );
275- mdns_test_execute_action (a );
276263#endif
277264 ForceTaskDelete ();
278265 mdns_free ();
0 commit comments