]> git.sur5r.net Git - openldap/commitdiff
The rest of the reloadHint support...
authorHoward Chu <hyc@openldap.org>
Sat, 15 Oct 2005 03:27:05 +0000 (03:27 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 15 Oct 2005 03:27:05 +0000 (03:27 +0000)
servers/slapd/overlays/syncprov.c

index ceb2d9eea6237fa2686236940eeae1e8e30cc817..dfce872ef487395757641a94371f491aa607bec0 100644 (file)
@@ -2139,6 +2139,13 @@ sp_cf_gen(ConfigArgs *c)
                                rc = 1;
                        }
                        break;
+               case SP_USEHINT:
+                       if ( si->si_usehint ) {
+                               c->value_int = 1;
+                       } else {
+                               rc = 1;
+                       }
+                       break;
                }
                return rc;
        } else if ( c->op == LDAP_MOD_DELETE ) {
@@ -2159,6 +2166,12 @@ sp_cf_gen(ConfigArgs *c)
                        else
                                rc = LDAP_NO_SUCH_ATTRIBUTE;
                        break;
+               case SP_USEHINT:
+                       if ( si->si_usehint )
+                               si->si_usehint = 0;
+                       else
+                               rc = LDAP_NO_SUCH_ATTRIBUTE;
+                       break;
                }
                return rc;
        }
@@ -2193,6 +2206,9 @@ sp_cf_gen(ConfigArgs *c)
        case SP_NOPRES:
                si->si_nopres = c->value_int;
                break;
+       case SP_USEHINT:
+               si->si_usehint = c->value_int;
+               break;
        }
        return rc;
 }
@@ -2440,6 +2456,7 @@ static int syncprov_parseCtrl (
                        rs->sr_text = "Sync control : cookie decoding error";
                        return LDAP_PROTOCOL_ERROR;
                }
+               tag = ber_peek_tag( ber, &len );
        }
        if ( tag == LDAP_TAG_RELOAD_HINT ) {
                if (( ber_scanf( ber, /*{*/ "b", &rhint )) == LBER_ERROR ) {