* room_ops.c: when granting a room creator access to a new room, omit the
authorArt Cancro <ajc@citadel.org>
Thu, 15 Dec 2005 05:05:53 +0000 (05:05 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 15 Dec 2005 05:05:53 +0000 (05:05 +0000)
  lgetuser/lputuser calls because they are not needed.  Also, don't perform
  access grant if no user is logged in.

citadel/ChangeLog
citadel/room_ops.c

index 1e186a771715ea5f3d91315b98e94a745bc5fbf6..dbadb02e51285234a97ad401c8ee5f4d020394f8 100644 (file)
@@ -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
 
index e268ed0c72ebbcabb6ef8554ef3df82a1238ac6c..dd2f60ce65fb611fa1a082be22b2a15b07d2e28c 100644 (file)
@@ -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 */