From a73e6fc1c5e335df801a2f46f1e1aba6570b1c32 Mon Sep 17 00:00:00 2001 From: Cathy Zhou Date: Tue, 3 Mar 2009 17:28:00 -0800 Subject: 6808233 someone call a doctor, dlmgmt_upcall_destroy() in need of medical attention 6810978 dlmgmt_advance_dlconfid() is lost in the woods --- usr/src/cmd/dlmgmtd/dlmgmt_door.c | 23 ++++++++++++----------- usr/src/cmd/dlmgmtd/dlmgmt_util.c | 6 +++--- 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'usr/src/cmd/dlmgmtd') diff --git a/usr/src/cmd/dlmgmtd/dlmgmt_door.c b/usr/src/cmd/dlmgmtd/dlmgmt_door.c index cbbdf40de9..c2c86ede72 100644 --- a/usr/src/cmd/dlmgmtd/dlmgmt_door.c +++ b/usr/src/cmd/dlmgmtd/dlmgmt_door.c @@ -325,24 +325,25 @@ dlmgmt_upcall_destroy(void *argp, void *retp) goto done; } - if (((linkp->ll_flags & flags) & DLMGMT_ACTIVE) && - ((err = dlmgmt_delete_db_entry(linkid, DLMGMT_ACTIVE)) != 0)) { - dflags = DLMGMT_ACTIVE; - goto done; + if (((linkp->ll_flags & flags) & DLMGMT_ACTIVE) != 0) { + err = dlmgmt_delete_db_entry(linkid, DLMGMT_ACTIVE); + if (err != 0) + goto done; + dflags |= DLMGMT_ACTIVE; } - if (((linkp->ll_flags & flags) & DLMGMT_PERSIST) && - ((err = dlmgmt_delete_db_entry(linkid, DLMGMT_PERSIST)) != 0)) { - if (dflags != 0) - (void) dlmgmt_write_db_entry(linkp->ll_linkid, dflags); + if (((linkp->ll_flags & flags) & DLMGMT_PERSIST) != 0) { + err = dlmgmt_delete_db_entry(linkid, DLMGMT_PERSIST); + if (err != 0) + goto done; dflags |= DLMGMT_PERSIST; - goto done; } - if ((err = dlmgmt_destroy_common(linkp, flags)) != 0 && dflags != 0) + err = dlmgmt_destroy_common(linkp, flags); +done: + if (err != 0 && dflags != 0) (void) dlmgmt_write_db_entry(linkp->ll_linkid, dflags); -done: dlmgmt_table_unlock(); retvalp->lr_err = err; } diff --git a/usr/src/cmd/dlmgmtd/dlmgmt_util.c b/usr/src/cmd/dlmgmtd/dlmgmt_util.c index ef1d3f7219..130a4ef9c5 100644 --- a/usr/src/cmd/dlmgmtd/dlmgmt_util.c +++ b/usr/src/cmd/dlmgmtd/dlmgmt_util.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -758,7 +758,7 @@ dlmgmt_advance_dlconfid(dlmgmt_dlconf_t *dlconfp) * wrapped around. search from 1. */ dlconf.ld_id = dlmgmt_nextconfid = 1; - dlconfp = avl_find(&dlmgmt_name_avl, &dlconf, NULL); + dlconfp = avl_find(&dlmgmt_dlconf_avl, &dlconf, NULL); if (dlconfp == NULL) return; } else { @@ -767,7 +767,7 @@ dlmgmt_advance_dlconfid(dlmgmt_dlconf_t *dlconfp) return; } } - dlconfp = AVL_NEXT(&dlmgmt_name_avl, dlconfp); + dlconfp = AVL_NEXT(&dlmgmt_dlconf_avl, dlconfp); dlmgmt_nextconfid++; } dlmgmt_nextconfid = 0; -- cgit v1.2.3