]> code.citadel.org Git - citadel.git/blobdiff - citadel/sysdep.c
* The size constant "256" which shows up everywhere as a buffer size has now
[citadel.git] / citadel / sysdep.c
index 2b6cb68009ed39650390e8c93a8ef56323875fe6..a50bb0818fe0f7a9d3a8c561f0439d536aafb425 100644 (file)
@@ -461,7 +461,7 @@ void client_write(char *buf, int nbytes)
  */
 void cprintf(const char *format, ...) {   
         va_list arg_ptr;   
-        char buf[256];   
+        char buf[SIZ];   
    
         va_start(arg_ptr, format);   
         if (vsnprintf(buf, sizeof buf, format, arg_ptr) == -1)
@@ -636,7 +636,7 @@ void cmd_nset(char *cmdbuf)
        FILE *netsetup;
        int ch;
        int a, b;
-       char netsetup_args[3][256];
+       char netsetup_args[3][SIZ];
 
        if (CC->usersupp.axlevel < 6) {
                cprintf("%d Higher access required.\n", 
@@ -1000,6 +1000,7 @@ int main(int argc, char **argv)
         * Now create a bunch of worker threads.
         */
        for (i=0; i<(config.c_min_workers-1); ++i) {
+               lprintf(9, "Creating worker thread %d\n", i);
                pthread_attr_init(&attr);
                        pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
                if (pthread_create(&WorkerThread, &attr,
@@ -1011,6 +1012,7 @@ int main(int argc, char **argv)
 
 
        /* Now this thread can become a worker as well. */
+       lprintf(9, "Original thread entering worker loop\n");
        worker_thread();
 
        return(0);
@@ -1048,7 +1050,6 @@ void worker_thread(void) {
 
        while (!time_to_die) {
 
-
                /* 
                 * A naive implementation would have all idle threads
                 * calling select() and then they'd all wake up at once.  We
@@ -1060,8 +1061,6 @@ void worker_thread(void) {
                 */
 
                begin_critical_section(S_I_WANNA_SELECT);
-               cdb_end_transaction();
-               cdb_begin_transaction();
 SETUP_FD:      memcpy(&readfds, &masterfds, sizeof masterfds);
                highest = masterhighest;
                begin_critical_section(S_SESSION_TABLE);