/*
* Server functions which perform operations on room objects.
*
- * Copyright (c) 1987-2011 by the citadel.org team
+ * Copyright (c) 1987-2012 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
+ * it under the terms of the GNU General Public License, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sysdep.h"
if (view != NULL) *view = vbuf.v_view;
}
+
/*
* Self-checking stuff for a room record read into memory
*/
len = bptr - lowercase_name;
if (qrbuf == NULL) {
- cdb_delete(CDB_ROOMS,
- lowercase_name, len);
+ cdb_delete(CDB_ROOMS, lowercase_name, len);
} else {
time(&qrbuf->QRmtime);
- cdb_store(CDB_ROOMS,
- lowercase_name, len,
- qrbuf, sizeof(struct ctdlroom));
+ cdb_store(CDB_ROOMS, lowercase_name, len, qrbuf, sizeof(struct ctdlroom));
}
}
}
-
/*
* CtdlPutRoomLock() - same as CtdlPutRoom() but unlocks the record (if supported)
*/
}
-/****************************************************************************/
-
/*
* CtdlGetFloorByName() - retrieve the number of the named floor
}
-
/*
* CtdlGetFloorByNameLock() - retrieve floor number for given floor and lock the floor list.
*/
}
+
/*
* lgetfloor() - same as CtdlGetFloor() but locks the record (if supported)
*/
}
-
/*
* CtdlPutFloor() - store floor data on disk
*/
}
-
/*
* CtdlPutFloorLock() - same as CtdlPutFloor() but unlocks the record (if supported)
*/
}
-
/*
* lputfloor() - same as CtdlPutFloor() but unlocks the record (if supported)
*/
memset(&qrbuf, 0, sizeof(struct ctdlroom));
memcpy(&qrbuf, cdbqr->ptr,
((cdbqr->len > sizeof(struct ctdlroom)) ?
- sizeof(struct ctdlroom) : cdbqr->len));
+ sizeof(struct ctdlroom) : cdbqr->len)
+ );
cdb_free(cdbqr);
room_sanity_check(&qrbuf);
- if (qrbuf.QRflags & QR_INUSE)
+ if (qrbuf.QRflags & QR_INUSE) {
(*CallBack)(&qrbuf, in_data);
+ }
}
}
struct cdbdata *cdbml;
/* Make sure the msglist we're deleting actually exists, otherwise
- * gdbm will complain when we try to delete an invalid record
+ * libdb will complain when we try to delete an invalid record
*/
cdbml = cdb_fetch(CDB_MSGLISTS, &whichroom->QRnumber, sizeof(long));
if (cdbml != NULL) {
}
-
/*
* Message pointer compare function for sort_msglist()
*/
/* and yank any nulls */
while ((numitems > 0) && (listptrs[0] == 0L)) {
- memmove(&listptrs[0], &listptrs[1],
- (sizeof(long) * (numitems - 1)));
+ memmove(&listptrs[0], &listptrs[1], (sizeof(long) * (numitems - 1)));
--numitems;
}
}
-
/*
* Back-back-end for all room listing commands
*/