DYNDNS protocol from now on accepts alternative update server name.
[bpdyndnsd] / src / httphelper.cpp
index a728d4e..474e79f 100644 (file)
@@ -8,6 +8,7 @@
 */
 
 #include "httphelper.hpp"
+#include "version_info.h"
 
 using namespace std;
 
@@ -164,7 +165,9 @@ string HTTPHelper::get_curl_data() const
 CURL* HTTPHelper::init_curl(string& curl_writedata_buff,char* curl_err_buff)
 {
     CurlInitError = CURLE_OK;
-    string user_agent = "Intra2net AG - Bullet Proof DYNDNS Daemon - 0.1.1";
+    ostringstream user_agent_stream;
+    user_agent_stream << "Intra2net AG - Bullet Proof DYNDNS Daemon - " << MAJOR_VERSION << "." << MINOR_VERSION << endl;
+    string user_agent = user_agent_stream.str();
 
     CURL *curl_easy_handle = curl_easy_init();
     if ( curl_easy_handle == NULL )