#include "housekeeping.h"
#include "user_ops.h"
#include "logging.h"
-#include "support.h"
#include "msgbase.h"
+#include "support.h"
#include "locate_host.h"
#include "room_ops.h"
#include "file_ops.h"
lprintf(7, "cleanup_stuff() calling RemoveContext(%d)\n", CC->cs_pid);
RemoveContext(CC);
- /* While we still have an extra thread with no user attached to it,
- * take the opportunity to do some housekeeping before exiting.
- */
- do_housekeeping();
+ /* Wake up the housekeeping thread */
+ enter_housekeeping_cmd("SCHED_SHUTDOWN");
}
lprintf(9, "CtdlAllocUserData(%ld) called\n", requested_sym);
+ /* Fail silently if the symbol is already registered. */
for (ptr = CC->FirstSessData; ptr != NULL; ptr = ptr->next) {
if (ptr->sym_id == requested_sym) {
- lprintf(2, "ERROR: CtdlAllocUserData() requested for"
- " symbol id %ld already registered\n",
- requested_sym);
return;
}
}
+ /* Grab us some memory! Dem's good eatin' !! */
ptr = mallok(sizeof(struct CtdlSessData));
ptr->sym_id = requested_sym;
ptr->sym_data = mallok(num_bytes);
cmd_gnur();
}
- else if (!strncasecmp(cmdbuf,"GREG",4)) {
- cmd_greg(&cmdbuf[5]);
- }
-
else if (!strncasecmp(cmdbuf,"VALI",4)) {
cmd_vali(&cmdbuf[5]);
}
cmd_list();
}
- else if (!strncasecmp(cmdbuf,"REGI",4)) {
- cmd_regi();
- }
-
else if (!strncasecmp(cmdbuf,"CHEK",4)) {
cmd_chek();
}