/*
* CtdlGetRoomLock() - same as getroom() but locks the record (if supported)
*/
-int CtdlGetRoomLock(struct ctdlroom *qrbuf, char *room_name)
+int CtdlGetRoomLock(struct ctdlroom *qrbuf, const char *room_name)
{
register int retval;
retval = CtdlGetRoom(qrbuf, room_name);
/* Know the room ... but not if it's the page log room, or if the
* caller specified that we're only entering this room transiently.
*/
- if ((strcasecmp(CCC->room.QRname, CtdlGetConfigStr("c_logpages")))
- && (transiently == 0) ) {
+ if ((strcasecmp(CCC->room.QRname, CtdlGetConfigStr("c_logpages"))) && (transiently == 0))
+ {
vbuf.v_flags = vbuf.v_flags & ~V_FORGET & ~V_LOCKOUT;
vbuf.v_flags = vbuf.v_flags | V_ACCESS;
}
/* If baseroom/aideroom name changes, update config */
if (!strncasecmp(old_name, CtdlGetConfigStr("c_baseroom"), ROOMNAMELEN)) {
- safestrncpy(CtdlGetConfigStr("c_baseroom"), new_name, ROOMNAMELEN);
- put_config();
+ CtdlSetConfigStr("c_baseroom", new_name);
}
if (!strncasecmp(old_name, CtdlGetConfigStr("c_aideroom"), ROOMNAMELEN)) {
- safestrncpy(CtdlGetConfigStr("c_aideroom"), new_name, ROOMNAMELEN);
- put_config();
+ CtdlSetConfigStr("c_aideroom", new_name);
}
end_critical_section(S_CONFIG);