if(rv != DNSSD_ERROR_NONE) {
printf("Failed to Initialize DNS SD CAPI [%s]\n",
dnssd_error_to_string(rv));
- return rv;
+ return 0;
}
printf("Successfully Initialized DNS SD CAPI\n");
return 1;
if(rv != DNSSD_ERROR_NONE) {
printf("Failed to De-Initialize DNS SD CAPI [%s]\n",
dnssd_error_to_string(rv));
- return rv;
+ return 0;
}
printf("Successfully De-Initialized DNS SD CAPI\n");
return 1;
if (rv != DNSSD_ERROR_NONE) {
printf("Failed to create DNS SD Service, error [%s]\n",
dnssd_error_to_string(rv));
- return rv;
+ return 0;
}
printf("Successfully created DNS SD Service[%u]\n", service);
if (rv != DNSSD_ERROR_NONE) {
printf("Failed to destroy DNS SD Service, error [%s]\n",
dnssd_error_to_string(rv));
- return rv;
+ return 0;
}
printf("Successfully destroyed DNS SD Service\n");
if (rv != DNSSD_ERROR_NONE) {
printf("Failed to get DNS SD Service type, error [%s]\n",
dnssd_error_to_string(rv));
- return rv;
+ return 0;
}
if (type)
if (rv != DNSSD_ERROR_NONE) {
printf("Failed to get DNS SD Service name, error [%s]\n",
dnssd_error_to_string(rv));
- return rv;
+ return 0;
}
if (name)
if (rv != DNSSD_ERROR_NONE) {
printf("Failed to get DNS SD Service IP, error [%s]\n",
dnssd_error_to_string(rv));
- return rv;
+ return 0;
}
printf("Service IP v4 [%s]\n", ip_v4_address);
if (rv != DNSSD_ERROR_NONE) {
printf("Failed to get DNS SD Service port, error [%s]\n",
dnssd_error_to_string(rv));
- return rv;
+ return 0;
}
printf("Service port [%d]\n", port);
g_free(ip_v4_address);
g_free(ip_v6_address);
- g_free(name);
- g_free(type);
g_free(txt_record);
}
+ g_free(name);
+ g_free(type);
}
int test_dnssd_start_browsing_service()