Update httping to 1.2.6 (#3624)
[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.2.6"
8 +
9 static volatile int stop = 0;
10
11 int quiet = 0;
12 @@ -50,7 +52,7 @@
13
14 void version(void)
15 {
16 - fprintf(stderr, "HTTPing v" VERSION ", (C) 2003-2008 folkert@vanheusden.com\n");
17 + fprintf(stderr, "HTTPing v%s (C) 2003-2008 folkert@vanheusden.com\n", VERSION);
18 #ifndef NO_SSL
19 fprintf(stderr, "SSL support included\n");
20 #endif
21 @@ -425,7 +427,7 @@
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);