diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp
index f49a66c..60ab7b4 100644
--- a/.sandstorm/sandstorm-pkgdef.capnp
+++ b/.sandstorm/sandstorm-pkgdef.capnp
@@ -19,9 +19,9 @@ const pkgdef :Spk.PackageDefinition = (
appTitle = (defaultText = "XRF Sync"),
- appVersion = 3, # Increment this for every release.
+ appVersion = 4, # Increment this for every release.
- appMarketingVersion = (defaultText = "0.0.4"),
+ appMarketingVersion = (defaultText = "0.0.5"),
# Human-readable representation of appVersion. Should match the way you
# identify versions of your app in documentation and marketing.
diff --git a/api/v1.php b/api/v1.php
index f2c06f2..56ef678 100644
--- a/api/v1.php
+++ b/api/v1.php
@@ -7,6 +7,7 @@
$message=mysqli_real_escape_string($xrf_db, $_GET['message'] ?? ''); //ciphertext
$user_agent=mysqli_real_escape_string($xrf_db, $_GET['user_agent']);
$new_ip_addr=mysqli_real_escape_string($xrf_db, $_GET['ip_address'] ?? '');
+$new_winver=mysqli_real_escape_string($xrf_db, $_GET['windows_version'] ?? '');
$identifysender = mysqli_prepare($xrf_db, "SELECT pool_id, descr, static, last_ip_addr FROM y_nodes WHERE access_key=?");
mysqli_stmt_bind_param($identifysender, "s", $access_key);
@@ -26,9 +27,9 @@
mysqli_stmt_execute($logipchange) or die(mysqli_error($xrf_db));
}
- $updatenode = mysqli_prepare($xrf_db, "UPDATE y_nodes SET last_seen = NOW(), last_ip_addr = ?, user_agent = ? WHERE access_key = ?");
+ $updatenode = mysqli_prepare($xrf_db, "UPDATE y_nodes SET last_seen = NOW(), last_ip_addr = ?, last_winver = ?, user_agent = ? WHERE access_key = ?");
if ($user_agent == "") { $user_agent = mysqli_real_escape_string($xrf_db, $_SERVER['HTTP_USER_AGENT']); }
- mysqli_stmt_bind_param($updatenode, "sss", $new_ip_addr, $user_agent, $access_key);
+ mysqli_stmt_bind_param($updatenode, "ssss", $new_ip_addr, $new_winver, $user_agent, $access_key);
mysqli_stmt_execute($updatenode) or die(mysqli_error($xrf_db));
if ($message_type == "fetch" && $destination == "server") {
diff --git a/modules/sync/acpm_nodelist.php b/modules/sync/acpm_nodelist.php
index 3218d98..a8265e2 100644
--- a/modules/sync/acpm_nodelist.php
+++ b/modules/sync/acpm_nodelist.php
@@ -8,7 +8,7 @@
$num=mysqli_num_rows($result);
-echo "
ID | Friendly Name | Pool | Last Seen | Last IP Address | User Agent |
";
+echo "ID | Friendly Name | Pool | Last Seen | Last IP Address | Windows Build | User Agent |
";
$qq=0;
while ($qq < $num) {
@@ -17,11 +17,13 @@
$pool_id=xrf_mysql_result($result,$qq,"pool_id");
$last_seen=xrf_mysql_result($result,$qq,"last_seen");
$last_ip_addr=xrf_mysql_result($result,$qq,"last_ip_addr");
+$last_winver=xrf_mysql_result($result,$qq,"last_winver");
+if ($last_winver != '') { $winbuild=substr($last_winver, 5); }
$user_agent=xrf_mysql_result($result,$qq,"user_agent");
$static=xrf_mysql_result($result,$qq,"static");
// TODO: If static, last seen should be green or red based on how long since it's checked in
-echo "$id | $descr | $pool_id | $last_seen | $last_ip_addr | $user_agent |
";
+echo "$id | $descr | $pool_id | $last_seen | $last_ip_addr | $winbuild | $user_agent |
";
$qq++;
}