--- a/main.c +++ b/main.c @@ -40,6 +40,8 @@ #include "utils.h" #include "error.h" +#define VERSION "1.2.6" + static volatile int stop = 0; int quiet = 0; @@ -50,7 +52,7 @@ void version(void) { - fprintf(stderr, "HTTPing v" VERSION ", (C) 2003-2008 folkert@vanheusden.com\n"); + fprintf(stderr, "HTTPing v%s (C) 2003-2008 folkert@vanheusden.com\n", VERSION); #ifndef NO_SSL fprintf(stderr, "SSL support included\n"); #endif @@ -425,7 +427,7 @@ if (useragent) sprintf(&request[strlen(request)], "User-Agent: %s\r\n", useragent); else - sprintf(&request[strlen(request)], "User-Agent: HTTPing v" VERSION "\r\n"); + sprintf(&request[strlen(request)], "User-Agent: HTTPing v%s\r\n", VERSION); sprintf(&request[strlen(request)], "Host: %s\r\n", hostname); if (referer) sprintf(&request[strlen(request)], "Referer: %s\r\n", referer);