[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Recent changes in servers/slapd/daemon.c break AIX (ITS#839)



Just one more thing. I see you are also setting sa_len, that isn't
portable, and not needed either. So I think we should do:

--- daemon.c.old        Mon Oct 16 20:50:49 2000
+++ daemon.c    Mon Oct 16 20:53:37 2000
@@ -279,7 +279,10 @@
                        *sap = NULL;
                        break;
                }
-               sap++;
+               if ( *sap != NULL ) {
+                       (*sap)->sa_family = sai->ai_family;
+                       sap++;
+               }
        } while ((sai = sai->ai_next) != NULL);
        freeaddrinfo(res);
 #else
@@ -985,7 +988,7 @@
                                                sizeof(from.sa_in6_addr.sin6_addr),
                                                AF_INET6 );
                                else
-#  endif LDAP_PF_INET6
+#  endif /* LDAP_PF_INET6 */
                                hp = gethostbyaddr(
                                        (char *) &(from.sa_in_addr.sin_addr),
                                        sizeof(from.sa_in_addr.sin_addr),

Stig