~ubuntu-branches/ubuntu/quantal/nginx/quantal-updates

« back to all changes in this revision

Viewing changes to debian/modules/nginx-echo/src/ngx_http_echo_util.c

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry
  • Date: 2011-04-16 13:47:58 UTC
  • mfrom: (4.2.31 sid)
  • Revision ID: james.westby@ubuntu.com-20110416134758-yqca2qp5crh2hw2f
Tags: 1.0.0-2
* debian/rules:
  + Removed --with-file-aio support. Fixed FTBFS on kFreeBSD-* arch
    (Closes: #621882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
 
196
196
    if (value < 0) {
197
197
        return NGX_ERROR;
198
 
    } else {
199
 
        return value;
200
198
    }
 
199
 
 
200
    return value;
201
201
}
202
202
 
203
203
 
259
259
    }
260
260
 
261
261
    if (src[0] == '/') {
262
 
        /* being an absolute path already */
 
262
        /* being an absolute path already, just add a trailing '\0' */
263
263
        *nsize = osize;
264
 
        return src;
 
264
 
 
265
        dst = ngx_palloc(pool, *nsize + 1);
 
266
        if (dst == NULL) {
 
267
            *nsize = 0;
 
268
            return NULL;
 
269
        }
 
270
 
 
271
        p = ngx_copy(dst, src, osize);
 
272
        *p = '\0';
 
273
 
 
274
        return dst;
265
275
    }
266
276
 
267
277
    *nsize = ngx_cycle->prefix.len + osize;
280
290
    return dst;
281
291
}
282
292
 
 
293
 
 
294
ngx_int_t
 
295
ngx_http_echo_flush_postponed_outputs(ngx_http_request_t *r)
 
296
{
 
297
    if (r == r->connection->data && r->postponed) {
 
298
        /* notify the downstream postpone filter to flush the postponed
 
299
         * outputs of the current request */
 
300
        return ngx_http_output_filter(r, NULL);
 
301
    }
 
302
 
 
303
    /* do nothing */
 
304
    return NGX_OK;
 
305
}