Skip to content

Commit

Permalink
Merge branch 'master' of github.com:openresty/rds-csv-nginx-module
Browse files Browse the repository at this point in the history
  • Loading branch information
agentzh committed Nov 1, 2015
2 parents 3979e40 + c718a3b commit a6fccf6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ddebug.h
Expand Up @@ -29,7 +29,8 @@

#include <stdarg.h>

static void dd(const char * fmt, ...) {
static ngx_inline void
dd(const char * fmt, ...) {
}

# endif
Expand All @@ -46,7 +47,8 @@ static void dd(const char * fmt, ...) {

#include <stdarg.h>

static void dd(const char * fmt, ...) {
static ngx_inline void
dd(const char * fmt, ...) {
}

# endif
Expand Down Expand Up @@ -81,4 +83,3 @@ static void dd(const char * fmt, ...) {
#endif

#endif /* DDEBUG_H */

4 changes: 4 additions & 0 deletions src/ngx_http_rds_csv_output.c
Expand Up @@ -429,11 +429,13 @@ ngx_http_rds_csv_output_field(ngx_http_request_t *r,
ngx_http_rds_csv_escape_csv_str(sep, last, data, len,
NULL);

#if DDEBUG
dd("escaped value \"%.*s\" (len %d, escape %d, escape2 %d)",
(int) (len + val_escape),
p, (int) (len + val_escape),
(int) val_escape,
(int) ((last - p) - len));
#endif
}

if (need_quotes && ctx->field_data_rest == 0) {
Expand Down Expand Up @@ -544,11 +546,13 @@ ngx_http_rds_csv_output_more_field_data(ngx_http_request_t *r,
last = (u_char *) ngx_http_rds_csv_escape_csv_str(sep, last, data,
len, NULL);

#if DDEBUG
dd("escaped value \"%.*s\" (len %d, escape %d, escape2 %d)",
(int) (len + escape),
p, (int) (len + escape),
(int) escape,
(int) ((last - p) - len));
#endif
}

if (ctx->field_data_rest == 0) {
Expand Down
3 changes: 3 additions & 0 deletions t/unused.t
Expand Up @@ -71,6 +71,9 @@ ok
=== TEST 3: used (multi http {} blocks)
This test case won't run with nginx 1.9.3+ since duplicate http {} blocks
have been prohibited since then.
--- SKIP
--- http_config eval: $::http_config
--- config
location = /t {
Expand Down

0 comments on commit a6fccf6

Please sign in to comment.