Changeset 76b05da169bf3ea9f062041fe8303338ed2e5c84

Show
Ignore:
Timestamp:
04/27/08 02:34:50 (10 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1209263690 +0000
git-parent:

[3596dc15e229f7b814203e71305d82868dac6c05]

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

after a remove, we may not add again... so we need to free it each and every time in remove. And allocate it when it is null in add

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/http.c

    r01dbb0d r76b05da  
    433433      if (!ctx->ssl_ctx) { 
    434434          ctx->ssl_ctx = serf_bucket_ssl_decrypt_context_get(c); 
     435          serf_ssl_use_default_certificates(ctx->ssl_ctx); 
    435436      } 
    436437  } 
     
    610611    e->fd = hack->socketdes; 
    611612    e->callback = serf_handler; 
     613  } 
     614  if(!e->closure) 
    612615    e->closure = calloc(1, sizeof(serf_closure_t)); 
    613   } 
    614616  newsct = e->closure; 
    615617  newsct->self = sct->self; 
     
    645647  noitL(nldeb, "serf_eventer_remove() => %d\n", hack->socketdes); 
    646648  e = eventer_find_fd(hack->socketdes); 
    647   if(e) e->mask = 0; 
     649  if(e) { 
     650    free(e->closure); 
     651    e->closure = NULL; 
     652    e->mask = 0; 
     653  } 
    648654  return 0; 
    649655}