diff --git a/src/db/database.cpp b/src/db/database.cpp
index a521a9f..c0e0a2d 100644
--- a/src/db/database.cpp
+++ b/src/db/database.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
diff --git a/src/db/database.hpp b/src/db/database.hpp
index ac4f9e5..6af4353 100644
--- a/src/db/database.hpp
+++ b/src/db/database.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
diff --git a/src/db/driver_sqlite.cpp b/src/db/driver_sqlite.cpp
index 9601420..e859055 100644
--- a/src/db/driver_sqlite.cpp
+++ b/src/db/driver_sqlite.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
@@ -99,7 +99,6 @@ namespace UDPT
void SQLite3Driver::doSetup()
{
-// cout << "Creating DB..." << endl;
char *eMsg = NULL;
// for quicker stats.
sqlite3_exec(this->db, "CREATE TABLE stats ("
@@ -109,13 +108,11 @@ namespace UDPT
"seeders INTEGER DEFAULT 0,"
"last_mod INTEGER DEFAULT 0"
")", NULL, NULL, &eMsg);
-// cout << "stats: " << (eMsg == NULL ? "OK" : eMsg) << endl;
- // for non-Dynamic trackers
+
sqlite3_exec(this->db, "CREATE TABLE torrents ("
"info_hash blob(20) UNIQUE,"
"created INTEGER"
")", NULL, NULL, &eMsg);
-// cout << "torrents: " << (eMsg == NULL ? "OK" : eMsg) << endl;
}
bool SQLite3Driver::getTorrentInfo(TorrentEntry *e)
@@ -209,8 +206,6 @@ namespace UDPT
sql += hash;
sql += "' (peer_id,ip,port,uploaded,downloaded,left,last_seen) VALUES (?,?,?,?,?,?,?)";
- // printf("IP->%x::%u\n", pE->ip, pE->port);
-
sqlite3_prepare(this->db, sql.c_str(), sql.length(), &stmt, NULL);
sqlite3_bind_blob(stmt, 1, (void*)peer_id, 20, NULL);
diff --git a/src/db/driver_sqlite.hpp b/src/db/driver_sqlite.hpp
index 34b28d9..2c6b392 100644
--- a/src/db/driver_sqlite.hpp
+++ b/src/db/driver_sqlite.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
@@ -43,7 +43,7 @@ namespace UDPT
bool getPeers (uint8_t info_hash [20], int *max_count, PeerEntry *pe);
void cleanup ();
- ~SQLite3Driver ();
+ virtual ~SQLite3Driver ();
private:
sqlite3 *db;
diff --git a/src/http/httpserver.cpp b/src/http/httpserver.cpp
index c8d774f..053c128 100644
--- a/src/http/httpserver.cpp
+++ b/src/http/httpserver.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013 Naim A.
+ * Copyright © 2013-2016 Naim A.
*
* This file is part of UDPT.
*
@@ -167,7 +167,7 @@ doSrv:
stringstream stream;
stream << "";
stream << "
Not Found";
- stream << "Not Found
The server couldn't find the request resource.
";
+ stream << "Not Found
The server couldn't find the request resource.
";
stream << "";
string str = stream.str();
resp.write (str.c_str(), str.length());
@@ -183,7 +183,7 @@ doSrv:
stringstream stream;
stream << "";
stream << "Internal Server Error";
- stream << "Internal Server Error
An Error Occurred while trying to process your request.
";
+ stream << "Internal Server Error
An Error Occurred while trying to process your request.
";
stream << "";
string str = stream.str();
resp.write (str.c_str(), str.length());
diff --git a/src/http/httpserver.hpp b/src/http/httpserver.hpp
index e4b1d16..39e2602 100644
--- a/src/http/httpserver.hpp
+++ b/src/http/httpserver.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013 Naim A.
+ * Copyright © 2013-2016 Naim A.
*
* This file is part of UDPT.
*
diff --git a/src/http/webapp.cpp b/src/http/webapp.cpp
index 4f2f870..4450d57 100644
--- a/src/http/webapp.cpp
+++ b/src/http/webapp.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013 Naim A.
+ * Copyright © 2013-2016 Naim A.
*
* This file is part of UDPT.
*
@@ -150,15 +150,10 @@ namespace UDPT
{
// It would be very appreciated to keep this in the code.
resp->write(""
- "Powered by UDPT"
+ "UDPT Torrent Tracker"
""
- "The UDPT Project
"
- "This tracker is running on UDPT Software.
"
- "UDPT is a open-source project, freely available for anyone to use. If you would like to obtain a copy of the software, you can get it here:
http://code.googe.com/p/udpt."
- "
If you would like to help the project grow, please donate for our hard work, effort & time:
"
- ""
- " "
- "
© 2013 Naim A. | Powered by
UDPT "
+ "This tracker is running on UDPT Software.
"
+ "
"
""
"");
}
diff --git a/src/http/webapp.hpp b/src/http/webapp.hpp
index 6a8011f..7b807fa 100644
--- a/src/http/webapp.hpp
+++ b/src/http/webapp.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2013 Naim A.
+ * Copyright © 2013-2016 Naim A.
*
* This file is part of UDPT.
*
diff --git a/src/logging.cpp b/src/logging.cpp
index 80ef946..e7110f9 100644
--- a/src/logging.cpp
+++ b/src/logging.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
diff --git a/src/logging.h b/src/logging.h
index 7d382ee..e7f300b 100644
--- a/src/logging.h
+++ b/src/logging.h
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
diff --git a/src/main.cpp b/src/main.cpp
index 86c923a..7414ea9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
diff --git a/src/multiplatform.h b/src/multiplatform.h
index e03f9be..5ff6d1c 100644
--- a/src/multiplatform.h
+++ b/src/multiplatform.h
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
diff --git a/src/settings.cpp b/src/settings.cpp
index ab7120f..4da755e 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1,6 +1,6 @@
/*
*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
@@ -156,8 +156,6 @@ void _settings_clean_string (char **str)
_settings_clean_string(&key);
_settings_clean_string(&value);
- // printf("KEY: '%s'\tVALUE: '%s'\n", key, value);
-
// add to settings...
this->set (className, key, value);
diff --git a/src/settings.hpp b/src/settings.hpp
index 6c308e2..dcec64a 100644
--- a/src/settings.hpp
+++ b/src/settings.hpp
@@ -1,6 +1,6 @@
/*
*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
@@ -119,51 +119,3 @@ namespace UDPT
void parseSettings (char *data, int len);
};
};
-
-//#ifdef __cplusplus
-//extern "C" {
-//#endif
-//
-//typedef struct {
-// char *key;
-// char *values;
-//} KeyValue;
-//
-//typedef struct {
-// char *classname;
-// KeyValue *entries;
-// uint32_t entry_count, entry_size;
-//} SettingClass;
-//
-//typedef struct {
-// char *filename;
-//
-// SettingClass *classes;
-// uint32_t class_count, class_size;
-//
-// char *buffer;
-//} Settings;
-//
-//
-//void settings_init (Settings *s, const char *filename);
-//
-//int settings_load (Settings *s);
-//
-//int settings_save (Settings *s);
-//
-//void settings_destroy (Settings *s);
-//
-//SettingClass* settings_get_class (Settings *s, const char *classname);
-//
-//char* settingclass_get (SettingClass *s, const char *name);
-//
-//int settingclass_set (SettingClass *s, const char *name, const char *value);
-//
-//char* settings_get (Settings *s, const char *classn, const char *name);
-//
-//
-//int settings_set (Settings *s, const char *classn, const char *name, const char *value);
-//
-//#ifdef __cplusplus
-//}
-//#endif
diff --git a/src/tools.c b/src/tools.c
index e47098d..60faa2b 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
diff --git a/src/tools.h b/src/tools.h
index be0afc5..39b1840 100644
--- a/src/tools.h
+++ b/src/tools.h
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
diff --git a/src/udpTracker.cpp b/src/udpTracker.cpp
index 2514868..00f4f70 100644
--- a/src/udpTracker.cpp
+++ b/src/udpTracker.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*
@@ -443,8 +443,6 @@ static int _isIANA_IP (uint32_t ip)
}
}
-// cout << ":: " << (void*)m_hton32(remote->sin_addr.s_addr) << ": " << m_hton16(remote->sin_port) << " ACTION=" << action << endl;
-
if (action == 0 && r >= 16)
return UDPTracker::handleConnection (usi, remote, data);
else if (action == 1 && r >= 98)
@@ -453,7 +451,6 @@ static int _isIANA_IP (uint32_t ip)
return UDPTracker::handleScrape (usi, remote, data, r);
else
{
-// cout << "E: action=" << action << ", r=" << r << endl;
UDPTracker::sendError (usi, remote, cR->transaction_id, "Tracker couldn't understand Client's request.");
return -1;
}
diff --git a/src/udpTracker.hpp b/src/udpTracker.hpp
index 7a89417..6344740 100644
--- a/src/udpTracker.hpp
+++ b/src/udpTracker.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright © 2012,2013 Naim A.
+ * Copyright © 2012-2016 Naim A.
*
* This file is part of UDPT.
*