as well, so they also need private CitContext structures.
static time_t last_run = 0L;
struct RoomProcList *ptr;
int full_processing = 1;
+ struct CitContext networkerCC;
+
+ /* Give the networker its own private CitContext */
+ memset(&networkerCC, 0, sizeof(struct CitContext));
+ networkerCC.internal_pgm = 1;
+ networkerCC.cs_pid = 0;
+ pthread_setspecific(MyConKey, (void *)&networkerCC );
/*
* Run the full set of processing tasks no more frequently
CtdlRegisterProtoHook(cmd_snet, "SNET", "Set network config");
CtdlRegisterProtoHook(cmd_netp, "NETP", "Identify as network poller");
CtdlRegisterProtoHook(cmd_nsyn, "NSYN", "Synchronize room to node");
-// CtdlRegisterSessionHook(network_do_queue, EVT_TIMER);
CtdlRegisterRoomHook(network_room_handler);
CtdlRegisterCleanupHook(destroy_network_queue_room);
}
static time_t last_run = 0L;
static int doing_rssclient = 0;
struct rssnetcfg *rptr = NULL;
+ struct CitContext rssclientCC;
+
+ /* Give this thread its own private CitContext */
+ memset(&rssclientCC, 0, sizeof(struct CitContext));
+ rssclientCC.internal_pgm = 1;
+ rssclientCC.cs_pid = 0;
+ pthread_setspecific(MyConKey, (void *)&rssclientCC );
CtdlThreadAllocTSD();
- /*
- * Run RSS client no more frequently than once every n seconds
- */
-// if ( (time(NULL) - last_run) < config.c_net_freq ) {
-// return;
-// }
/*
* This is a simple concurrency check to make sure only one rssclient run
if (threading)
{
#ifdef HAVE_EXPAT
-// CtdlRegisterSessionHook(rssclient_scan, EVT_TIMER);
CtdlThreadSchedule ("RSS Client", CTDLTHREAD_BIGSTACK, rssclient_scan, NULL, 0);
#else
lprintf(CTDL_INFO, "This server is missing the Expat XML parser. RSS client will be disabled.\n");
/* Promote to time_t; types differ on some OSes (like darwin) */
unixtime = tv.tv_sec;
localtime_r(&unixtime, &tim);
+/*
if (CC->cs_pid != 0) {
sprintf(buf,
"%04d/%02d/%02d %2d:%02d:%02d.%06ld [%3d] ",
tim.tm_mday, tim.tm_hour, tim.tm_min,
tim.tm_sec, (long)tv.tv_usec);
}
+FIXME temp i want to see CC */
+ sprintf(buf,
+ "%2d:%02d:%02d.%06ld 0x%08lx ",
+ tim.tm_hour, tim.tm_min,
+ tim.tm_sec, (long)tv.tv_usec, CC);
vsnprintf(buf2, SIZ, format, arg_ptr);
fprintf(stderr, "%s%s", buf, buf2);