From de6c20b1d9dc3f726dae428ff9cb89f765114466 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 15 Dec 2005 05:05:53 +0000 Subject: [PATCH] * room_ops.c: when granting a room creator access to a new room, omit the lgetuser/lputuser calls because they are not needed. Also, don't perform access grant if no user is logged in. --- citadel/ChangeLog | 5 +++++ citadel/room_ops.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 1e186a771..dbadb02e5 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,5 +1,10 @@ $Id$ +Thu Dec 15 00:03:53 EST 2005 ajc +* room_ops.c: when granting a room creator access to a new room, omit the + lgetuser/lputuser calls because they are not needed. Also, don't perform + access grant if no user is logged in. + Sun Dec 11 23:04:31 EST 2005 ajc * THIS IS 6.63 diff --git a/citadel/room_ops.c b/citadel/room_ops.c index e268ed0c7..dd2f60ce6 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -1805,13 +1805,11 @@ unsigned create_room(char *new_room_name, /* Grant the creator access to the room unless the avoid_access * parameter was specified. */ - if (avoid_access == 0) { - lgetuser(&CC->user, CC->curr_user); + if ( (CC->logged_in) && (avoid_access == 0) ) { CtdlGetRelationship(&vbuf, &CC->user, &qrbuf); vbuf.v_flags = vbuf.v_flags & ~V_FORGET & ~V_LOCKOUT; vbuf.v_flags = vbuf.v_flags | V_ACCESS; CtdlSetRelationship(&vbuf, &CC->user, &qrbuf); - lputuser(&CC->user); } /* resume our happy day */ -- 2.39.2