diff options
author | FxQnLr <[email protected]> | 2024-04-11 15:48:20 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-11 15:48:20 +0200 |
commit | b615f6e34e084d520dcc301058b5926074188500 (patch) | |
tree | cd19ad3355949b682485f720339a856b9de3396a /src/routes | |
parent | 6b05d1a437a49db98056de7b029923e8aedf1a5a (diff) | |
parent | 1777c5c91c7b37ad458b62930f20fc518ca76777 (diff) | |
download | webol-0.4.0.tar webol-0.4.0.tar.gz webol-0.4.0.zip |
Merge pull request #34 from FxQnLr/nostartv0.4.0
Fix devices not starting
Diffstat (limited to 'src/routes')
-rw-r--r-- | src/routes/start.rs | 6 |
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 @@ | |||
1 | use crate::storage::Device; | 1 | use crate::storage::Device; |
2 | use crate::error::Error; | 2 | use crate::error::Error; |
3 | use crate::services::ping::Value as PingValue; | 3 | use crate::services::ping::Value as PingValue; |
4 | use crate::wol::send_packet; | 4 | use crate::wol::{create_buffer, send_packet}; |
5 | use axum::extract::{Path, State}; | 5 | use axum::extract::{Path, State}; |
6 | use axum::Json; | 6 | use axum::Json; |
7 | use serde::{Deserialize, Serialize}; | 7 | use 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 { |