#include <time.h>
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
+#include <boost/regex.hpp>
namespace ba = boost::algorithm;
// Check the status code for protocol errors.
if ( http_status_code == 200 )
{
- // TODO: Account related errors should be handled here!
- return 0;
+ // Get the received http data.
+ string curl_data = HTTPHelp->get_curl_data();
+
+ // Search for the following string in the received http data
+ boost::regex expr_done("Updating ip on .*: done");
+ if ( boost::regex_search(curl_data,expr_done) )
+ {
+ // Update successful
+ return 0;
+ }
+ else
+ {
+ get_logger()->print_update_failure(url,curl_data);
+ }
}
else if ( http_status_code == 401 )
{