Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
List overview
Download
389-commits
December 2013
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
389-commits@lists.fedoraproject.org
6 participants
107 discussions
Start a n
N
ew thread
Branch '389-ds-base-1.2.11' - ldap/servers
by Mark Reynolds
16 Dec '13
16 Dec '13
ldap/servers/plugins/replication/cl5_api.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit 962de25824635ff66ab0dd95dacdca17a38d147a Author: Mark Reynolds <mreynolds(a)redhat.com> Date: Sat Dec 14 07:38:12 2013 -0500 Ticket 47627 - Fix replication logging We printed the same CSN for the missing CSN and the supplier min CSN because we reused the same CSN pointer.
https://fedorahosted.org/389/ticket/47627
Reviewed by: rmeggins(Thanks!) (cherry picked from commit 20cccf58108099cead2412a979e70e4f5972b806) diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c index 55bda39..ae522a3 100644 --- a/ldap/servers/plugins/replication/cl5_api.c +++ b/ldap/servers/plugins/replication/cl5_api.c @@ -5041,6 +5041,7 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum int i; CSN **csns = NULL; CSN *startCSN = NULL; + CSN *minCSN = NULL; char csnStr [CSN_STRSIZE]; int rc = CL5_SUCCESS; Object *supplierRuvObj = NULL; @@ -5130,20 +5131,24 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum */ if ((rc == DB_NOTFOUND) && !ruv_has_csns(file->purgeRUV)) { + char mincsnStr[CSN_STRSIZE]; + /* use the supplier min csn for the buffer start csn - we know this csn is in our changelog */ - if ((RUV_SUCCESS == ruv_get_min_csn_ext(supplierRuv, &startCSN, 1 /* ignore cleaned rids */)) && - startCSN) + if ((RUV_SUCCESS == ruv_get_min_csn_ext(supplierRuv, &minCSN, 1 /* ignore cleaned rids */)) && + minCSN) { /* must now free startCSN */ if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) { - csn_as_string(startCSN, PR_FALSE, csnStr); + csn_as_string(startCSN, PR_FALSE, csnStr); + csn_as_string(minCSN, PR_FALSE, mincsnStr); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: CSN %s not found and no purging, probably a reinit\n", agmt_name, csnStr); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: Will try to use supplier min CSN %s to load changelog\n", - agmt_name, csnStr); + agmt_name, mincsnStr); } + startCSN = minCSN; rc = clcache_load_buffer (clcache, startCSN, DB_SET); } else
1
0
0
0
Branch '389-ds-base-1.3.0' - ldap/servers
by Mark Reynolds
16 Dec '13
16 Dec '13
ldap/servers/plugins/replication/cl5_api.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit 78f20eedf693d9504a20fb39e2e618d259e2bc2b Author: Mark Reynolds <mreynolds(a)redhat.com> Date: Sat Dec 14 07:38:12 2013 -0500 Ticket 47627 - Fix replication logging We printed the same CSN for the missing CSN and the supplier min CSN because we reused the same CSN pointer.
https://fedorahosted.org/389/ticket/47627
Reviewed by: rmeggins(Thanks!) (cherry picked from commit 20cccf58108099cead2412a979e70e4f5972b806) diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c index a769fa7..ea0f85d 100644 --- a/ldap/servers/plugins/replication/cl5_api.c +++ b/ldap/servers/plugins/replication/cl5_api.c @@ -5041,6 +5041,7 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum int i; CSN **csns = NULL; CSN *startCSN = NULL; + CSN *minCSN = NULL; char csnStr [CSN_STRSIZE]; int rc = CL5_SUCCESS; Object *supplierRuvObj = NULL; @@ -5130,20 +5131,24 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum */ if ((rc == DB_NOTFOUND) && !ruv_has_csns(file->purgeRUV)) { + char mincsnStr[CSN_STRSIZE]; + /* use the supplier min csn for the buffer start csn - we know this csn is in our changelog */ - if ((RUV_SUCCESS == ruv_get_min_csn_ext(supplierRuv, &startCSN, 1 /* ignore cleaned rids */)) && - startCSN) + if ((RUV_SUCCESS == ruv_get_min_csn_ext(supplierRuv, &minCSN, 1 /* ignore cleaned rids */)) && + minCSN) { /* must now free startCSN */ if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) { - csn_as_string(startCSN, PR_FALSE, csnStr); + csn_as_string(startCSN, PR_FALSE, csnStr); + csn_as_string(minCSN, PR_FALSE, mincsnStr); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: CSN %s not found and no purging, probably a reinit\n", agmt_name, csnStr); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: Will try to use supplier min CSN %s to load changelog\n", - agmt_name, csnStr); + agmt_name, mincsnStr); } + startCSN = minCSN; rc = clcache_load_buffer (clcache, startCSN, DB_SET); } else
1
0
0
0
Branch '389-ds-base-1.3.1' - ldap/servers
by Mark Reynolds
16 Dec '13
16 Dec '13
ldap/servers/plugins/replication/cl5_api.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit ae3daa16783bab18f202a71b81177f4407dccdcd Author: Mark Reynolds <mreynolds(a)redhat.com> Date: Sat Dec 14 07:38:12 2013 -0500 Ticket 47627 - Fix replication logging We printed the same CSN for the missing CSN and the supplier min CSN because we reused the same CSN pointer.
https://fedorahosted.org/389/ticket/47627
Reviewed by: rmeggins(Thanks!) (cherry picked from commit 20cccf58108099cead2412a979e70e4f5972b806) diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c index 064a628..abcc39a 100644 --- a/ldap/servers/plugins/replication/cl5_api.c +++ b/ldap/servers/plugins/replication/cl5_api.c @@ -5081,6 +5081,7 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum int i; CSN **csns = NULL; CSN *startCSN = NULL; + CSN *minCSN = NULL; char csnStr [CSN_STRSIZE]; int rc = CL5_SUCCESS; Object *supplierRuvObj = NULL; @@ -5170,20 +5171,24 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum */ if ((rc == DB_NOTFOUND) && !ruv_has_csns(file->purgeRUV)) { + char mincsnStr[CSN_STRSIZE]; + /* use the supplier min csn for the buffer start csn - we know this csn is in our changelog */ - if ((RUV_SUCCESS == ruv_get_min_csn_ext(supplierRuv, &startCSN, 1 /* ignore cleaned rids */)) && - startCSN) + if ((RUV_SUCCESS == ruv_get_min_csn_ext(supplierRuv, &minCSN, 1 /* ignore cleaned rids */)) && + minCSN) { /* must now free startCSN */ if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) { - csn_as_string(startCSN, PR_FALSE, csnStr); + csn_as_string(startCSN, PR_FALSE, csnStr); + csn_as_string(minCSN, PR_FALSE, mincsnStr); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: CSN %s not found and no purging, probably a reinit\n", agmt_name, csnStr); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: Will try to use supplier min CSN %s to load changelog\n", - agmt_name, csnStr); + agmt_name, mincsnStr); } + startCSN = minCSN; rc = clcache_load_buffer (clcache, startCSN, DB_SET); } else
1
0
0
0
Branch '389-ds-base-1.3.2' - ldap/servers
by Mark Reynolds
16 Dec '13
16 Dec '13
ldap/servers/plugins/replication/cl5_api.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit e43bb7d9e8454b5cda03f5795c70114956333bd8 Author: Mark Reynolds <mreynolds(a)redhat.com> Date: Sat Dec 14 07:38:12 2013 -0500 Ticket 47627 - Fix replication logging We printed the same CSN for the missing CSN and the supplier min CSN because we reused the same CSN pointer.
https://fedorahosted.org/389/ticket/47627
Reviewed by: rmeggins(Thanks!) (cherry picked from commit 20cccf58108099cead2412a979e70e4f5972b806) diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c index 4a9d81c..980296e 100644 --- a/ldap/servers/plugins/replication/cl5_api.c +++ b/ldap/servers/plugins/replication/cl5_api.c @@ -5166,6 +5166,7 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum int i; CSN **csns = NULL; CSN *startCSN = NULL; + CSN *minCSN = NULL; char csnStr [CSN_STRSIZE]; int rc = CL5_SUCCESS; Object *supplierRuvObj = NULL; @@ -5255,20 +5256,24 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum */ if ((rc == DB_NOTFOUND) && !ruv_has_csns(file->purgeRUV)) { + char mincsnStr[CSN_STRSIZE]; + /* use the supplier min csn for the buffer start csn - we know this csn is in our changelog */ - if ((RUV_SUCCESS == ruv_get_min_csn_ext(supplierRuv, &startCSN, 1 /* ignore cleaned rids */)) && - startCSN) + if ((RUV_SUCCESS == ruv_get_min_csn_ext(supplierRuv, &minCSN, 1 /* ignore cleaned rids */)) && + minCSN) { /* must now free startCSN */ if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) { - csn_as_string(startCSN, PR_FALSE, csnStr); + csn_as_string(startCSN, PR_FALSE, csnStr); + csn_as_string(minCSN, PR_FALSE, mincsnStr); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: CSN %s not found and no purging, probably a reinit\n", agmt_name, csnStr); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: Will try to use supplier min CSN %s to load changelog\n", - agmt_name, csnStr); + agmt_name, mincsnStr); } + startCSN = minCSN; rc = clcache_load_buffer (clcache, startCSN, DB_SET); } else
1
0
0
0
ldap/servers
by Mark Reynolds
16 Dec '13
16 Dec '13
ldap/servers/plugins/replication/cl5_api.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit 20cccf58108099cead2412a979e70e4f5972b806 Author: Mark Reynolds <mreynolds(a)redhat.com> Date: Sat Dec 14 07:38:12 2013 -0500 Ticket 47627 - Fix replication logging We printed the same CSN for the missing CSN and the supplier min CSN because we reused the same CSN pointer.
https://fedorahosted.org/389/ticket/47627
Reviewed by: rmeggins(Thanks!) diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c index 4a9d81c..980296e 100644 --- a/ldap/servers/plugins/replication/cl5_api.c +++ b/ldap/servers/plugins/replication/cl5_api.c @@ -5166,6 +5166,7 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum int i; CSN **csns = NULL; CSN *startCSN = NULL; + CSN *minCSN = NULL; char csnStr [CSN_STRSIZE]; int rc = CL5_SUCCESS; Object *supplierRuvObj = NULL; @@ -5255,20 +5256,24 @@ static int _cl5PositionCursorForReplay (ReplicaId consumerRID, const RUV *consum */ if ((rc == DB_NOTFOUND) && !ruv_has_csns(file->purgeRUV)) { + char mincsnStr[CSN_STRSIZE]; + /* use the supplier min csn for the buffer start csn - we know this csn is in our changelog */ - if ((RUV_SUCCESS == ruv_get_min_csn_ext(supplierRuv, &startCSN, 1 /* ignore cleaned rids */)) && - startCSN) + if ((RUV_SUCCESS == ruv_get_min_csn_ext(supplierRuv, &minCSN, 1 /* ignore cleaned rids */)) && + minCSN) { /* must now free startCSN */ if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) { - csn_as_string(startCSN, PR_FALSE, csnStr); + csn_as_string(startCSN, PR_FALSE, csnStr); + csn_as_string(minCSN, PR_FALSE, mincsnStr); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: CSN %s not found and no purging, probably a reinit\n", agmt_name, csnStr); slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "%s: Will try to use supplier min CSN %s to load changelog\n", - agmt_name, csnStr); + agmt_name, mincsnStr); } + startCSN = minCSN; rc = clcache_load_buffer (clcache, startCSN, DB_SET); } else
1
0
0
0
Branch '389-ds-base-1.3.1' - ldap/servers
by Mark Reynolds
16 Dec '13
16 Dec '13
ldap/servers/plugins/replication/repl5_agmtlist.c | 12 +----------- ldap/servers/plugins/replication/repl5_replica_config.c | 2 +- 2 files changed, 2 insertions(+), 12 deletions(-) New commits: commit c094a9f1a758dabd1164bf979a4ac22bb3720d63 Author: Mark Reynolds <mreynolds(a)redhat.com> Date: Mon Dec 16 09:48:12 2013 -0500 Ticket 47620 - Fix logically dead code. Coverity issues: 12419 & 12420
https://fedorahosted.org/389/ticket/47620
Reviewed by: rmeggins(Thanks!) (cherry picked from commit 080cb44f5eaa794375a8e69b6e1ac09fcae9a961) diff --git a/ldap/servers/plugins/replication/repl5_agmtlist.c b/ldap/servers/plugins/replication/repl5_agmtlist.c index bd14202..5219c92 100644 --- a/ldap/servers/plugins/replication/repl5_agmtlist.c +++ b/ldap/servers/plugins/replication/repl5_agmtlist.c @@ -277,17 +277,7 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore, Slapi_Entry break; } - /* Start replica initialization */ - if (val == NULL) - { - PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "No value supplied for attr (%s)", mods[i]->mod_type); - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_modify_callback: %s\n", - errortext); - *returncode = LDAP_UNWILLING_TO_PERFORM; - rc = SLAPI_DSE_CALLBACK_ERROR; - break; - } - + /* Start replica initialization */ if (strcasecmp (val, "start") == 0) { start_initialize = 1; diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c index 563ced3..fa324e9 100644 --- a/ldap/servers/plugins/replication/repl5_replica_config.c +++ b/ldap/servers/plugins/replication/repl5_replica_config.c @@ -495,7 +495,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* *returncode = LDAP_SUCCESS; } else if (strcasecmp (config_attr, type_replicaProtocolTimeout) == 0 ){ - if (apply_mods && config_attr_value && config_attr_value[0]) + if (apply_mods) { long ptimeout = 0;
1
0
0
0
Branch '389-ds-base-1.3.2' - ldap/servers
by Mark Reynolds
16 Dec '13
16 Dec '13
ldap/servers/plugins/replication/repl5_agmtlist.c | 10 ---------- ldap/servers/plugins/replication/repl5_replica_config.c | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) New commits: commit 862f0d6765ba03068d558cdc1e8eb66d1678ea80 Author: Mark Reynolds <mreynolds(a)redhat.com> Date: Mon Dec 16 09:48:12 2013 -0500 Ticket 47620 - Fix logically dead code. Coverity issues: 12419 & 12420
https://fedorahosted.org/389/ticket/47620
Reviewed by: rmeggins(Thanks!) (cherry picked from commit 080cb44f5eaa794375a8e69b6e1ac09fcae9a961) diff --git a/ldap/servers/plugins/replication/repl5_agmtlist.c b/ldap/servers/plugins/replication/repl5_agmtlist.c index 6b33607..18540b4 100644 --- a/ldap/servers/plugins/replication/repl5_agmtlist.c +++ b/ldap/servers/plugins/replication/repl5_agmtlist.c @@ -278,16 +278,6 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore, Slapi_Entry } /* Start replica initialization */ - if (val == NULL) - { - PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "No value supplied for attr (%s)", mods[i]->mod_type); - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_modify_callback: %s\n", - errortext); - *returncode = LDAP_UNWILLING_TO_PERFORM; - rc = SLAPI_DSE_CALLBACK_ERROR; - break; - } - if (strcasecmp (val, "start") == 0) { start_initialize = 1; diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c index 7ba6eaa..4e24c7b 100644 --- a/ldap/servers/plugins/replication/repl5_replica_config.c +++ b/ldap/servers/plugins/replication/repl5_replica_config.c @@ -496,7 +496,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* *returncode = LDAP_SUCCESS; } else if (strcasecmp (config_attr, type_replicaProtocolTimeout) == 0 ){ - if (apply_mods && config_attr_value && config_attr_value[0]) + if (apply_mods) { long ptimeout = 0;
1
0
0
0
ldap/servers
by Mark Reynolds
16 Dec '13
16 Dec '13
ldap/servers/plugins/replication/repl5_agmtlist.c | 10 ---------- ldap/servers/plugins/replication/repl5_replica_config.c | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) New commits: commit 080cb44f5eaa794375a8e69b6e1ac09fcae9a961 Author: Mark Reynolds <mreynolds(a)redhat.com> Date: Mon Dec 16 09:48:12 2013 -0500 Ticket 47620 - Fix logically dead code. Coverity issues: 12419 & 12420
https://fedorahosted.org/389/ticket/47620
Reviewed by: rmeggins(Thanks!) diff --git a/ldap/servers/plugins/replication/repl5_agmtlist.c b/ldap/servers/plugins/replication/repl5_agmtlist.c index 7d1c651..59eb84f 100644 --- a/ldap/servers/plugins/replication/repl5_agmtlist.c +++ b/ldap/servers/plugins/replication/repl5_agmtlist.c @@ -278,16 +278,6 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore, Slapi_Entry } /* Start replica initialization */ - if (val == NULL) - { - PR_snprintf (errortext, SLAPI_DSE_RETURNTEXT_SIZE, "No value supplied for attr (%s)", mods[i]->mod_type); - slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, "agmtlist_modify_callback: %s\n", - errortext); - *returncode = LDAP_UNWILLING_TO_PERFORM; - rc = SLAPI_DSE_CALLBACK_ERROR; - break; - } - if (strcasecmp (val, "start") == 0) { start_initialize = 1; diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c index 9abbbac..dfe898a 100644 --- a/ldap/servers/plugins/replication/repl5_replica_config.c +++ b/ldap/servers/plugins/replication/repl5_replica_config.c @@ -496,7 +496,7 @@ replica_config_modify (Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* *returncode = LDAP_SUCCESS; } else if (strcasecmp (config_attr, type_replicaProtocolTimeout) == 0 ){ - if (apply_mods && config_attr_value && config_attr_value[0]) + if (apply_mods) { long ptimeout = 0;
1
0
0
0
Branch '389-ds-base-1.3.2' - ldap/servers
by Noriko Hosoi
13 Dec '13
13 Dec '13
ldap/servers/slapd/back-ldbm/filterindex.c | 22 ++++++++++++---------- ldap/servers/slapd/back-ldbm/idl_common.c | 17 ++++++++++++++++- 2 files changed, 28 insertions(+), 11 deletions(-) New commits: commit c8b44e12f808c63db1530eeeb2bb1cbd686bd5cb Author: Noriko Hosoi <nhosoi(a)redhat.com> Date: Fri Dec 13 10:35:08 2013 -0800 Ticket #47313 - Indexed search with filter containing '&' and "!" with attribute subtypes gives wrong result Description: commit fae006821bd6e524c0f7f8d5f023f4fe5e160ef0 introduced a bug, which occurs when a filter includes NOT and one of the results from the subfilters returns NONE. This patch backoffs the last section of the commit fae006821bd6e524c0f7f8d5f023f4fe5e160ef0 with an improvement -- avoiding unnecessary idl duplication. Also, adding (NULL == idl) checks to idl_common.c.
https://fedorahosted.org/389/ticket/47313
Reviewed by rmeggins(a)redhat.com (Thank you, Rich!) (cherry picked from commit a71633d56951dd6c4d0368c790b85628f1598968) diff --git a/ldap/servers/slapd/back-ldbm/filterindex.c b/ldap/servers/slapd/back-ldbm/filterindex.c index 971e10b..9ad2ab4 100644 --- a/ldap/servers/slapd/back-ldbm/filterindex.c +++ b/ldap/servers/slapd/back-ldbm/filterindex.c @@ -852,17 +852,19 @@ list_candidates( break; /* We can exit the loop now, since the candidate list is small already */ } } else if ( ftype == LDAP_FILTER_AND ) { - if (isnot && !idl_is_allids(tmp)) { - IDList *new_idl = NULL; - int notin_result = 0; - /* - * If the given tmp is ALLIDs (due to subtype in filter), - * we cannot use idl_notin. + if (isnot) { + /* + * If tmp is NULL or ALLID, idl_notin just duplicates idl. + * We don't have to do it. */ - notin_result = idl_notin( be, idl, tmp, &new_idl ); - if (notin_result) { - idl_free(idl); - idl = new_idl; + if (!tmp && !idl_is_allids(tmp)) { + IDList *new_idl = NULL; + int notin_result = 0; + notin_result = idl_notin( be, idl, tmp, &new_idl ); + if (notin_result) { + idl_free(idl); + idl = new_idl; + } } } else { idl = idl_intersection(be, idl, tmp); diff --git a/ldap/servers/slapd/back-ldbm/idl_common.c b/ldap/servers/slapd/back-ldbm/idl_common.c index 584bba5..e3023d8 100644 --- a/ldap/servers/slapd/back-ldbm/idl_common.c +++ b/ldap/servers/slapd/back-ldbm/idl_common.c @@ -46,16 +46,25 @@ size_t idl_sizeof(IDList *idl) { + if (NULL == idl) { + return 0; + } return (2 + idl->b_nmax) * sizeof(ID); } NIDS idl_length(IDList *idl) { + if (NULL == idl) { + return 0; + } return (idl->b_nmax == ALLIDSBLOCK) ? UINT_MAX : idl->b_nids; } int idl_is_allids(IDList *idl) { + if (NULL == idl) { + return 0; + } return (idl->b_nmax == ALLIDSBLOCK); } @@ -110,6 +119,9 @@ idl_free( IDList *idl ) /* JCM - pass in ** */ int idl_append( IDList *idl, ID id) { + if (NULL == idl) { + return 2; + } if ( ALLIDS( idl ) || ( (idl->b_nids) && (idl->b_ids[idl->b_nids - 1] == id)) ) { return( 1 ); /* already there */ } @@ -321,7 +333,7 @@ idl_notin( backend *be, IDList *a, IDList *b, - IDList **new_result + IDList **new_result ) { NIDS ni, ai, bi; @@ -435,6 +447,9 @@ idl_nextid( IDList *idl, ID id ) { NIDS i; + if (NULL == idl) { + return NOID; + } if ( ALLIDS( idl ) ) { return( ++id < idl->b_nids ? id : NOID ); }
1
0
0
0
ldap/servers
by Noriko Hosoi
13 Dec '13
13 Dec '13
ldap/servers/slapd/back-ldbm/filterindex.c | 22 ++++++++++++---------- ldap/servers/slapd/back-ldbm/idl_common.c | 17 ++++++++++++++++- 2 files changed, 28 insertions(+), 11 deletions(-) New commits: commit a71633d56951dd6c4d0368c790b85628f1598968 Author: Noriko Hosoi <nhosoi(a)redhat.com> Date: Fri Dec 13 10:35:08 2013 -0800 Ticket #47313 - Indexed search with filter containing '&' and "!" with attribute subtypes gives wrong result Description: commit fae006821bd6e524c0f7f8d5f023f4fe5e160ef0 introduced a bug, which occurs when a filter includes NOT and one of the results from the subfilters returns NONE. This patch backoffs the last section of the commit fae006821bd6e524c0f7f8d5f023f4fe5e160ef0 with an improvement -- avoiding unnecessary idl duplication. Also, adding (NULL == idl) checks to idl_common.c.
https://fedorahosted.org/389/ticket/47313
Reviewed by rmeggins(a)redhat.com (Thank you, Rich!) diff --git a/ldap/servers/slapd/back-ldbm/filterindex.c b/ldap/servers/slapd/back-ldbm/filterindex.c index 971e10b..9ad2ab4 100644 --- a/ldap/servers/slapd/back-ldbm/filterindex.c +++ b/ldap/servers/slapd/back-ldbm/filterindex.c @@ -852,17 +852,19 @@ list_candidates( break; /* We can exit the loop now, since the candidate list is small already */ } } else if ( ftype == LDAP_FILTER_AND ) { - if (isnot && !idl_is_allids(tmp)) { - IDList *new_idl = NULL; - int notin_result = 0; - /* - * If the given tmp is ALLIDs (due to subtype in filter), - * we cannot use idl_notin. + if (isnot) { + /* + * If tmp is NULL or ALLID, idl_notin just duplicates idl. + * We don't have to do it. */ - notin_result = idl_notin( be, idl, tmp, &new_idl ); - if (notin_result) { - idl_free(idl); - idl = new_idl; + if (!tmp && !idl_is_allids(tmp)) { + IDList *new_idl = NULL; + int notin_result = 0; + notin_result = idl_notin( be, idl, tmp, &new_idl ); + if (notin_result) { + idl_free(idl); + idl = new_idl; + } } } else { idl = idl_intersection(be, idl, tmp); diff --git a/ldap/servers/slapd/back-ldbm/idl_common.c b/ldap/servers/slapd/back-ldbm/idl_common.c index 584bba5..e3023d8 100644 --- a/ldap/servers/slapd/back-ldbm/idl_common.c +++ b/ldap/servers/slapd/back-ldbm/idl_common.c @@ -46,16 +46,25 @@ size_t idl_sizeof(IDList *idl) { + if (NULL == idl) { + return 0; + } return (2 + idl->b_nmax) * sizeof(ID); } NIDS idl_length(IDList *idl) { + if (NULL == idl) { + return 0; + } return (idl->b_nmax == ALLIDSBLOCK) ? UINT_MAX : idl->b_nids; } int idl_is_allids(IDList *idl) { + if (NULL == idl) { + return 0; + } return (idl->b_nmax == ALLIDSBLOCK); } @@ -110,6 +119,9 @@ idl_free( IDList *idl ) /* JCM - pass in ** */ int idl_append( IDList *idl, ID id) { + if (NULL == idl) { + return 2; + } if ( ALLIDS( idl ) || ( (idl->b_nids) && (idl->b_ids[idl->b_nids - 1] == id)) ) { return( 1 ); /* already there */ } @@ -321,7 +333,7 @@ idl_notin( backend *be, IDList *a, IDList *b, - IDList **new_result + IDList **new_result ) { NIDS ni, ai, bi; @@ -435,6 +447,9 @@ idl_nextid( IDList *idl, ID id ) { NIDS i; + if (NULL == idl) { + return NOID; + } if ( ALLIDS( idl ) ) { return( ++id < idl->b_nids ? id : NOID ); }
1
0
0
0
← Newer
1
2
3
4
5
6
...
11
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
Results per page:
10
25
50
100
200