referral_mode_reply(Slapi_PBlock *pb)
{
    struct slapdplugin *plugin;
    plugin = (struct slapdplugin *)slapi_ch_calloc(1, sizeof(struct slapdplugin));
    if (plugin != NULL) {
        struct berval *urls[2], url;
        char *refer;
        refer = config_get_referral_mode();
        slapi_pblock_set(pb, SLAPI_PLUGIN, plugin);
        set_db_default_result_handlers(pb);
        urls[0] = &url;
        urls[1] = NULL;
        url.bv_val = refer;
        url.bv_len = refer ? strlen(refer) : 0;
        slapi_send_ldap_result(pb, LDAP_REFERRAL, NULL, NULL, 0, urls);
        slapi_ch_free((void **)&plugin);
        slapi_ch_free((void **)&refer);
    }
}
referral_mode_reply(Slapi_PBlock *pb)
{
    struct slapdplugin *plugin;
    plugin = (struct slapdplugin *)slapi_ch_calloc(1, sizeof(struct slapdplugin));
    if (plugin != NULL) {
        struct berval *urls[2], url;
        char *refer;
        refer = config_get_referral_mode();
        slapi_pblock_set(pb, SLAPI_PLUGIN, plugin);
        set_db_default_result_handlers(pb);
        urls[0] = &url;
        urls[1] = NULL;
        url.bv_val = refer;
        url.bv_len = refer ? strlen(refer) : 0;
        slapi_send_ldap_result(pb, LDAP_REFERRAL, NULL, NULL, 0, urls);
        slapi_ch_free((void **)&plugin);
        slapi_ch_free((void **)&refer);
    }
}