static __thread gboolean g_is_gssdp_init;
static __thread GSSDPClient *g_gssdp_client = NULL;
-static __thread GList *g_ssdp_local_services;
+static __thread GList *g_ssdp_local_services = NULL;
static __thread GHashTable *g_found_ssdp_services = NULL;
//static __thread GList *g_ssdp_browsers; TODO
/*****************************************************************************
GList *list;
for (list = services; list != NULL; list = list->next) {
service = list->data;
- if (service && strncmp(service->usn, usn, strlen(usn))) {
+ if (service && !g_strcmp0(service->usn, usn)) {
SSDP_LOGD("USN [%s]", service->usn);
break;
}
GList *list;
for (list = services; list != NULL; list = list->next) {
service = list->data;
- if (service && strncmp(service->url, url, strlen(url))) {
+ if (service && !g_strcmp0(service->url, url)) {
SSDP_LOGD("URL [%s]", service->url);
break;
}
}
GLIST_ITER_START(g_ssdp_local_services, browser)
- if (strncmp(target, browser->target, strlen(target)) &&
+ if (!strncmp(target, browser->target, strlen(target)) &&
browser->origin == SSDP_SERVICE_STATE_BROWSED) {
SSDP_LOGD("Browsing request is already registered");
}