diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-14 16:55:01 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-14 16:55:01 +0000 |
commit | 384b1d12f957a3a4c80fb32bc29cb79c282ac361 (patch) | |
tree | 8011c52fb98f2613626edfcd879508bc5c45d66a /libbb | |
parent | 0372f0f1999ace825a2265ad03b80be627b039fb (diff) | |
download | busybox-w32-384b1d12f957a3a4c80fb32bc29cb79c282ac361.tar.gz busybox-w32-384b1d12f957a3a4c80fb32bc29cb79c282ac361.tar.bz2 busybox-w32-384b1d12f957a3a4c80fb32bc29cb79c282ac361.zip |
httpd: add -v[v]: prints client addresses, HTTP codes returned [and URLs]
get_line - 70 +70
packed_usage 22811 22863 +52
handle_incoming_and_exit 2246 2277 +31
httpd_main 1141 1155 +14
sendHeaders 489 482 -7
getLine 77 - -77
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 3/1 up/down: 167/-84) Total: 83 bytes
text data bss dec hex filename
774335 1058 11092 786485 c0035 busybox_old
774447 1058 11092 786597 c00a5 busybox_unstripped
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/xfuncs.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 67c986640..4e17c28bd 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
@@ -484,12 +484,14 @@ int fdprintf(int fd, const char *format, ...) | |||
484 | #else | 484 | #else |
485 | // Bloat for systems that haven't got the GNU extension. | 485 | // Bloat for systems that haven't got the GNU extension. |
486 | va_start(p, format); | 486 | va_start(p, format); |
487 | r = vsnprintf(NULL, 0, format, p); | 487 | r = vsnprintf(NULL, 0, format, p) + 1; |
488 | va_end(p); | ||
489 | string_ptr = xmalloc(r+1); | ||
490 | va_start(p, format); | ||
491 | r = vsnprintf(string_ptr, r+1, format, p); | ||
492 | va_end(p); | 488 | va_end(p); |
489 | string_ptr = malloc(r); | ||
490 | if (string_ptr) { | ||
491 | va_start(p, format); | ||
492 | r = vsnprintf(string_ptr, r, format, p); | ||
493 | va_end(p); | ||
494 | } | ||
493 | #endif | 495 | #endif |
494 | 496 | ||
495 | if (r >= 0) { | 497 | if (r >= 0) { |