Changeset ee04721b5f474cd61c27829606db92c23a87eb87

Show
Ignore:
Timestamp:
04/13/12 20:12:49 (2 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1334347969 +0000
git-parent:

[93ee67631e38d219f26ed5c4cfadb77fe919a653]

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

Allow asynchronous threads to call flush on http connections, which
does all the same work, but doesn't attempt to manipulate the state
of the connection in the eventer.

Files:

Legend:

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

    r6e68e26 ree04721  
    13101310  } 
    13111311} 
    1312 noit_boolean 
    1313 noit_http_response_flush(noit_http_session_ctx *ctx, noit_boolean final) { 
     1312static noit_boolean 
     1313_noit_http_response_flush(noit_http_session_ctx *ctx, 
     1314                          noit_boolean final, 
     1315                          noit_boolean update_eventer) { 
    13141316  struct bchain *o, *r; 
    13151317  int mask, rv; 
     
    13711373 
    13721374  rv = _http_perform_write(ctx, &mask); 
    1373   if(ctx->conn.e) { 
     1375  if(update_eventer && ctx->conn.e) { 
    13741376    eventer_update(ctx->conn.e, mask); 
    13751377  } 
     
    13791381   */ 
    13801382  return ctx->conn.e ? noit_true : noit_false; 
     1383} 
     1384 
     1385noit_boolean 
     1386noit_http_response_flush(noit_http_session_ctx *ctx, 
     1387                         noit_boolean final) { 
     1388  _noit_http_response_flush(ctx, final, noit_true); 
     1389} 
     1390noit_boolean 
     1391noit_http_response_flush_asynch(noit_http_session_ctx *ctx, 
     1392                                noit_boolean final) { 
     1393  _noit_http_response_flush(ctx, final, noit_false); 
    13811394} 
    13821395 
  • src/noit_http.h

    rbfbfefd ree04721  
    167167API_EXPORT(noit_boolean) 
    168168  noit_http_response_flush(noit_http_session_ctx *, noit_boolean); 
     169API_EXPORT(noit_boolean) 
     170  noit_http_response_flush_asynch(noit_http_session_ctx *, noit_boolean); 
    169171API_EXPORT(noit_boolean) noit_http_response_end(noit_http_session_ctx *); 
    170172