summaryrefslogtreecommitdiff
path: root/src/routes
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2024-04-11 15:42:55 +0200
committerFxQnLr <[email protected]>2024-04-11 15:42:55 +0200
commit0ba5230d078530fe4daa79b6269675a581fda7f5 (patch)
treeb6a6779a1ab76f4b54185c760bf6a1bdd418cbf6 /src/routes
parent6b05d1a437a49db98056de7b029923e8aedf1a5a (diff)
downloadwebol-0ba5230d078530fe4daa79b6269675a581fda7f5.tar
webol-0ba5230d078530fe4daa79b6269675a581fda7f5.tar.gz
webol-0ba5230d078530fe4daa79b6269675a581fda7f5.zip
revert removal of `create_buffer`
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/start.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/start.rs b/src/routes/start.rs
index ae2b384..bbc6ab8 100644
--- a/src/routes/start.rs
+++ b/src/routes/start.rs
@@ -1,7 +1,7 @@
1use crate::storage::Device; 1use crate::storage::Device;
2use crate::error::Error; 2use crate::error::Error;
3use crate::services::ping::Value as PingValue; 3use crate::services::ping::Value as PingValue;
4use crate::wol::send_packet; 4use crate::wol::{create_buffer, send_packet};
5use axum::extract::{Path, State}; 5use axum::extract::{Path, State};
6use axum::Json; 6use axum::Json;
7use serde::{Deserialize, Serialize}; 7use serde::{Deserialize, Serialize};
@@ -61,10 +61,10 @@ fn send_wol(
61 61
62 let bind_addr = "0.0.0.0:0"; 62 let bind_addr = "0.0.0.0:0";
63 63
64 let _ = send_packet( 64 send_packet(
65 bind_addr, 65 bind_addr,
66 &device.broadcast_addr.to_string(), 66 &device.broadcast_addr.to_string(),
67 &device.mac.bytes() 67 &create_buffer(&device.mac.to_string())?
68 )?; 68 )?;
69 let dev_id = device.id.clone(); 69 let dev_id = device.id.clone();
70 let uuid = if let Some(pl) = payload { 70 let uuid = if let Some(pl) = payload {