Permalink
Browse files

fixed compatibility with nginx 1.1.4: ngx_chain_update_chains has bee…

…n changed.
  • Loading branch information...
agentzh committed Sep 24, 2011
1 parent 1fc3af0 commit 3ec225f54ec43397fd2a4f62a68928a2f5725807
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/ngx_http_drizzle_output.c
@@ -10,6 +10,7 @@
#include "ngx_http_drizzle_processor.h"
#include "ngx_http_drizzle_util.h"
#include "resty_dbd_stream.h"
+#include <nginx.h>
#define ngx_http_drizzle_module_header_key "X-Resty-DBD-Module"
@@ -286,8 +287,13 @@ ngx_http_drizzle_output_bufs(ngx_http_request_t *r,
return rc;
}
+#if defined(nginx_version) && nginx_version >= 1001004
+ ngx_chain_update_chains(r->pool, &u->free_bufs, &u->busy_bufs, &u->out_bufs,
+ u->output.tag);
+#else
ngx_chain_update_chains(&u->free_bufs, &u->busy_bufs, &u->out_bufs,
u->output.tag);
+#endif
dp->last_out = &u->out_bufs;
}

0 comments on commit 3ec225f

Please sign in to comment.