Show
Ignore:
Timestamp:
02/18/08 21:53:00 (11 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1203371580 +0000
git-parent:

[3b3b432b41dd3bfb80c144aa7ba28e75daa2337f]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1203371580 +0000
Message:

remove tests... last commit (w/ tests) was for sanity and reference

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noitd.c

    r3b3b432 r08cc6f6  
    1515#include "noit_module.h" 
    1616#include "noit_conf.h" 
    17  
    18 int test_asynch_cb(eventer_t e, int mask, void *closure, struct timeval *now) { 
    19   time_t tmp; 
    20   int seconds = (int)closure; 
    21  
    22   noitL(noit_error, "%d: test_asynch_cb fired on (%p) mask 0x%x\n", 
    23         (int)time(&tmp), e, mask); 
    24   if(mask & EVENTER_ASYNCH_WORK) { 
    25     noitL(noit_error, "%d: Starting test_asynch_cb(%p) for %d seconds\n", 
    26           (int)time(&tmp), e, seconds); 
    27     sleep(seconds); 
    28     noitL(noit_error, "%d: Finishing up test_asynch_cb(%p)\n", (int)time(&tmp), e); 
    29   } 
    30   if(mask & EVENTER_ASYNCH_CLEANUP) { 
    31     noitL(noit_error, "%d: Cleaning up test_asynch_cb(%p)\n", (int)time(&tmp), e); 
    32   } 
    33   e->mask = 0; 
    34   return 0; 
    35 } 
    36 void test_asynch() { 
    37   eventer_t e; 
    38  
    39   e = eventer_alloc(); 
    40   e->mask = EVENTER_ASYNCH; 
    41   gettimeofday(&e->whence, NULL); e->whence.tv_sec += 10; 
    42   e->closure = (void *)5; 
    43   e->callback = test_asynch_cb; 
    44   eventer_add(e); 
    45  
    46   e = eventer_alloc(); 
    47   e->mask = EVENTER_ASYNCH; 
    48   gettimeofday(&e->whence, NULL); e->whence.tv_sec += 2; 
    49   e->closure = (void *)10; 
    50   e->callback = test_asynch_cb; 
    51   eventer_add(e); 
    52 } 
    5317 
    5418static char *config_file = ETC_DIR "/noit.conf"; 
     
    137101  noit_listener_init(); 
    138102 
    139   test_asynch(); 
    140  
    141103  eventer_loop(); 
    142104  return 0;