if (loglevel <= verbosity) {
fprintf(stderr, "%s", buf);
fflush(stderr);
- }
+ }
PerformLogHooks(loglevel, buf);
- }
+}
hptr->h_ptr = ptr;
heap = hptr;
return ptr;
- }
+}
char *tracked_strdup(const char *orig, char *tfile, int tline) {
char *s;
hptr = heap->next;
free(heap);
heap = hptr;
- }
+ }
else {
for (hptr=heap; hptr->next!=NULL; hptr=hptr->next) {
if (hptr->next->h_ptr == ptr) {
freeme = hptr->next;
hptr->next = hptr->next->next;
free(freeme);
- }
}
}
+ }
free(ptr);
- }
+}
void *tracked_realloc(void *ptr, size_t size) {
void *newptr;
for (hptr=heap; hptr!=NULL; hptr=hptr->next) {
if (hptr->h_ptr == ptr) hptr->h_ptr = newptr;
- }
+ }
return newptr;
- }
+}
void dump_tracked() {
for (hptr=heap; hptr!=NULL; hptr=hptr->next) {
cprintf("%20s %5d\n",
hptr->h_file, hptr->h_line);
- }
+ }
#ifdef __GNUC__
malloc_stats();
#endif
cprintf("000\n");
- }
+}
#endif
/*
- * Bind a thread to a context.
+ * Bind a thread to a context. (It's inline merely to speed things up.)
*/
inline void become_session(struct CitContext *which_con) {
pthread_setspecific(MyConKey, (void *)which_con );
* calling select() and then they'd all wake up at once. We
* solve this problem by putting the select() in a critical
* section, so only one thread has the opportunity to wake
- * up. If we wake up on the master socket, create a new
+ * up. If we wake up on a master socket, create a new
* session context; otherwise, just bind the thread to the
* context we want and go on our merry way.
*/
--- /dev/null
+ Description of the files in the "netconfigs" directory
+
+ These files contain a set of network configurations for a room. They are
+stored in the directory $BBSDIR/netconfigs and are named according to each
+room's internal ID number. When a room is deleted, its network configuration
+file is deleted as well.
+
+ The configuration file contains one or more lines of text, each line
+containing a configuration option. These lines may specify message pointers,
+room sharing instructions, mailing list recipients, etc. Fields are separated
+by the vertical bar character ("|") and there will always be at least one
+field on each line.
+
+
+ INSTRUCTION: lastsent
+ SYNTAX: lastsent|0000000
+ DESCRIPTION:
+ Defines the *local* message number of the last message in this room which
+we have performed outbound network processing on. Any batch job which sends
+out messages should do stuff.
+
+
+ INSTRUCTION: foo
+ SYNTAX: lastsent|0000000
+ DESCRIPTION: