Changeset 0ba16060522984b6f0f311e3b6da4e135ea15433

Show
Ignore:
Timestamp:
02/23/11 20:53:34 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1298494414 +0000
git-parent:

[2648da95633d939f2cb0dd601b14ada1d9ff0667]

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

a varity of strat aliasing problems and avoiding odd includes on Linux

Files:

Legend:

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

    r8c720f9 r0ba1606  
    15701570                                               const char *, void *)) { 
    15711571  struct datastore_onlooker_list *nnode; 
     1572  vpsized_int *vonlookers = (void *)&onlookers; 
    15721573  nnode = calloc(1, sizeof(*nnode)); 
    15731574  nnode->dispatch = f; 
    15741575  nnode->next = onlookers; 
    1575   while(noit_atomic_casptr((volatile void **)&onlookers, 
     1576  while(noit_atomic_casptr(vonlookers, 
    15761577                           nnode, nnode->next) != (void *)nnode->next) 
    15771578    nnode->next = onlookers; 
  • src/stratcon_iep.c

    r4135087 r0ba1606  
    7979start_iep_daemon(); 
    8080 
    81 static float 
     81static double 
    8282stratcon_iep_age_from_line(char *data, struct timeval now) { 
    83   float n, t; 
     83  double n, t; 
    8484  if(data && (*data == 'S' || *data == 'M')) { 
    8585    if(data[1] != '\t') return 0; 
    86     t = strtof(data + 2, NULL); 
     86    t = strtod(data + 2, NULL); 
    8787    n = (float)now.tv_sec + (float)now.tv_usec / 1000000.0; 
    8888    return n - t; 
     
    361361stratcon_iep_submitter(eventer_t e, int mask, void *closure, 
    362362                       struct timeval *now) { 
    363   float age; 
     363  double age; 
    364364  struct iep_job_closure *job = closure; 
    365365  struct iep_thread_driver *driver; 
  • src/stratcon_jlog_streamer.c

    rec0f79b r0ba1606  
    920920                            void *closure) { 
    921921  noit_hash_iter iter = NOIT_HASH_ITER_ZERO; 
    922   void *key_id; 
     922  const char *key_id; 
    923923  int klen, n = 0, i; 
    924924  void *vconn; 
     
    927927  pthread_mutex_lock(&noits_lock); 
    928928  ctx = malloc(sizeof(*ctx) * noits.size); 
    929   while(noit_hash_next(&noits, &iter, (const char **)&key_id, &klen, 
     929  while(noit_hash_next(&noits, &iter, &key_id, &klen, 
    930930                       &vconn)) { 
    931931    ctx[n] = (noit_connection_ctx_t *)vconn; 
     
    10101010  noit_connection_ctx_t **ctxs; 
    10111011  noit_hash_iter iter = NOIT_HASH_ITER_ZERO; 
    1012   void *key_id; 
     1012  const char *key_id; 
    10131013  void *vconn; 
    10141014  int klen, n = 0, i; 
     
    10361036  pthread_mutex_lock(&noits_lock); 
    10371037  ctxs = malloc(sizeof(*ctxs) * noits.size); 
    1038   while(noit_hash_next(&noits, &iter, (const char **)&key_id, &klen, 
     1038  while(noit_hash_next(&noits, &iter, &key_id, &klen, 
    10391039                       &vconn)) { 
    10401040    ctxs[n] = (noit_connection_ctx_t *)vconn; 
     
    10771077  noit_hash_iter iter = NOIT_HASH_ITER_ZERO; 
    10781078  char path[256]; 
    1079   void *key_id; 
     1079  const char *key_id; 
    10801080  const char *type = NULL, *want_cn = NULL; 
    10811081  int klen, n = 0, i, di, cnt; 
     
    10951095  pthread_mutex_lock(&noits_lock); 
    10961096  ctxs = malloc(sizeof(*ctxs) * noits.size); 
    1097   while(noit_hash_next(&noits, &iter, (const char **)&key_id, &klen, 
     1097  while(noit_hash_next(&noits, &iter, &key_id, &klen, 
    10981098                       &vconn)) { 
    10991099    ctxs[n] = (noit_connection_ctx_t *)vconn; 
     
    13061306stratcon_remove_noit(const char *target, unsigned short port) { 
    13071307  noit_hash_iter iter = NOIT_HASH_ITER_ZERO; 
    1308   void *key_id; 
     1308  const char *key_id; 
    13091309  int klen, n = -1, i, cnt = 0; 
    13101310  void *vconn; 
     
    13361336  pthread_mutex_lock(&noits_lock); 
    13371337  ctx = malloc(sizeof(*ctx) * noits.size); 
    1338   while(noit_hash_next(&noits, &iter, (const char **)&key_id, &klen, 
     1338  while(noit_hash_next(&noits, &iter, &key_id, &klen, 
    13391339                       &vconn)) { 
    13401340    if(!strcmp(((noit_connection_ctx_t *)vconn)->remote_str, remote_str)) {