[packages] httping: update to v1.4.0 (#6461)
[openwrt/svn-archive/archive.git] / net / httping / patches / 002-version.patch
1 --- a/main.c
2 +++ b/main.c
3 @@ -40,6 +40,8 @@
4 #include "utils.h"
5 #include "error.h"
6
7 +#define VERSION "1.4.0"
8 +
9 static volatile int stop = 0;
10
11 int quiet = 0;
12 @@ -51,7 +53,7 @@ char last_error[ERROR_BUFFER_SIZE];
13
14 void version(void)
15 {
16 - fprintf(stderr, "HTTPing v" VERSION ", (C) 2003-2009 folkert@vanheusden.com\n");
17 + fprintf(stderr, "HTTPing v%s (C) 2003-2009 folkert@vanheusden.com\n", VERSION);
18 #ifndef NO_SSL
19 fprintf(stderr, "SSL support included\n");
20 #endif
21 @@ -524,7 +526,7 @@ int main(int argc, char *argv[])
22 if (useragent)
23 sprintf(&request[strlen(request)], "User-Agent: %s\r\n", useragent);
24 else
25 - sprintf(&request[strlen(request)], "User-Agent: HTTPing v" VERSION "\r\n");
26 + sprintf(&request[strlen(request)], "User-Agent: HTTPing v%s\r\n", VERSION);
27 sprintf(&request[strlen(request)], "Host: %s\r\n", hostname);
28 if (referer)
29 sprintf(&request[strlen(request)], "Referer: %s\r\n", referer);