]> git.sur5r.net Git - openldap/commitdiff
ITS#7200 fix regression in b4d403ea310022ca4ffcbf31fa20ead6c754f28d
authorHoward Chu <hyc@openldap.org>
Fri, 9 Mar 2012 21:10:58 +0000 (13:10 -0800)
committerHoward Chu <hyc@openldap.org>
Fri, 9 Mar 2012 21:10:58 +0000 (13:10 -0800)
servers/slapd/bconfig.c

index e277d2e5ef590ea76b5a57e9d3b9e43bc6dce10b..9326185e10599784809804d5c37cb8282a4547f9 100644 (file)
@@ -911,7 +911,7 @@ typedef struct ServerID {
 } ServerID;
 
 static ServerID *sid_list;
-static int sid_set;
+static ServerID *sid_set;
 
 typedef struct voidList {
        struct voidList *vl_next;
@@ -1363,6 +1363,8 @@ config_generic(ConfigArgs *c) {
                                si; si = *sip, i++ ) {
                                if ( c->valx == -1 || i == c->valx ) {
                                        *sip = si->si_next;
+                                       if ( sid_set == si )
+                                               sid_set = NULL;
                                        ch_free( si );
                                        if ( c->valx >= 0 )
                                                break;
@@ -2036,7 +2038,7 @@ sortval_reject:
                                        Debug( LDAP_DEBUG_CONFIG,
                                                "%s: SID=0x%03x\n",
                                                c->log, slap_serverID, 0 );
-                                       sid_set = 1;
+                                       sid_set = si;
                                }
                                si->si_next = NULL;
                                si->si_num = num;
@@ -2059,7 +2061,7 @@ sortval_reject:
                                                        "%s: SID=0x%03x (listener=%s)\n",
                                                        c->log, slap_serverID,
                                                        l->sl_url.bv_val );
-                                               sid_set = 1;
+                                               sid_set = si;
                                        }
                                }
                                if ( c->argc > 2 )