diff options
| author | Cathy Zhou <Cathy.Zhou@Sun.COM> | 2009-03-03 17:28:00 -0800 |
|---|---|---|
| committer | Cathy Zhou <Cathy.Zhou@Sun.COM> | 2009-03-03 17:28:00 -0800 |
| commit | a73e6fc1c5e335df801a2f46f1e1aba6570b1c32 (patch) | |
| tree | b802a869c82da194ac04c258209ce0666853f104 /usr/src/cmd/dlmgmtd | |
| parent | 3f1da666124ac25caadfacd3f2a361d4a41268a8 (diff) | |
| download | illumos-joyent-a73e6fc1c5e335df801a2f46f1e1aba6570b1c32.tar.gz | |
6808233 someone call a doctor, dlmgmt_upcall_destroy() in need of medical attention
6810978 dlmgmt_advance_dlconfid() is lost in the woods
Diffstat (limited to 'usr/src/cmd/dlmgmtd')
| -rw-r--r-- | usr/src/cmd/dlmgmtd/dlmgmt_door.c | 23 | ||||
| -rw-r--r-- | usr/src/cmd/dlmgmtd/dlmgmt_util.c | 6 |
2 files changed, 15 insertions, 14 deletions
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; |
