return -5;
}
- if( domain == NULL ) ndomain[0] = '\0';
+ if( domain == NULL ) {
+ ndomain[0] = '\0';
+ } else {
+ strcat( ndomain, "." );
+ }
strcat( ndomain, dc );
- strcat( ndomain, "." );
domain = ndomain;
continue;
LDAP_CONST char *domain,
char **list )
{
-#ifdef HAVE_RES_SEARCH
+#ifdef HAVE_RES_QUERY
char *request;
- char *dn;
char *hostlist = NULL;
int rc, len, cur = 0;
unsigned char reply[1024];
ldap_pvt_thread_mutex_lock(&ldap_int_resolv_mutex);
#endif
- len = res_search(request, C_IN, T_SRV, reply, sizeof(reply));
+ rc = LDAP_UNAVAILABLE;
+ len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
if (len >= 0) {
unsigned char *p;
char host[1024];
return rc;
#else
return LDAP_NOT_SUPPORTED;
-#endif /* HAVE_RES_SEARCH */
+#endif /* HAVE_RES_QUERY */
}