From: Cheoleun Moon Date: Wed, 23 Jun 2021 05:12:24 +0000 (+0900) Subject: Get TXT records on resolved callback X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F279905%2F1;p=platform%2Fcore%2Fapi%2Fnsd.git Get TXT records on resolved callback Change-Id: I88657c9ee6ca57b35b856788ef6a453fa629b40b Signed-off-by: Cheoleun Moon --- diff --git a/src/dns-sd/dns-sd.c b/src/dns-sd/dns-sd.c index 2448981..b02227b 100644 --- a/src/dns-sd/dns-sd.c +++ b/src/dns-sd/dns-sd.c @@ -1309,7 +1309,8 @@ static int __dnssd_getaddrinfo(dnssd_handle_s *dnssd_handle, unsigned int flags, return DNSSD_ERROR_OUT_OF_MEMORY; } - DNSSD_LOGD("dnssd_handle[%p] optype[%d]", dnssd_handle, dnssd_handle->op_type); + DNSSD_LOGD("dnssd_handle[%p] optype[%d] if_index[%u] host[%s] name[%s] fullname[%s]", + dnssd_handle, dnssd_handle->op_type, if_index, host_name, service_name, fullname); if (dnssd_handle->op_type == DNSSD_TYPE_BROWSE) { __extract_domain_from_name(fullname, &domain); local_handle = __create_found_service(dnssd_handle, DNSSD_TYPE_FOUND, @@ -1319,6 +1320,10 @@ static int __dnssd_getaddrinfo(dnssd_handle_s *dnssd_handle, unsigned int flags, local_handle = dnssd_handle; dnssd_found_data_s *found = GET_FOUND_DATA_P(local_handle); found->port = (int)ntohs(port); + if (txt_record != NULL) { + found->txt_record = g_strndup(txt_record, txt_len); + found->txt_len = txt_len; + } } else { DNSSD_LOGE("Invalid op_type[%d].", dnssd_handle->op_type); return DNSSD_ERROR_OPERATION_FAILED;