]> code.octet-stream.net Git - m17rt/blobdiff - m17app/src/app.rs
Round trip packet modulation and demodulation via RRC
[m17rt] / m17app / src / app.rs
index a7bb3cd291b18efbf154ec5d54807fe32faf408a..7d363dd1808522b986e06e687e39b82c3c8bd544 100644 (file)
@@ -84,12 +84,7 @@ pub struct TxHandle {
 }
 
 impl TxHandle {
-    pub fn transmit_packet(
-        &self,
-        link_setup: &LinkSetup,
-        packet_type: &PacketType,
-        payload: &[u8],
-    ) {
+    pub fn transmit_packet(&self, link_setup: &LinkSetup, packet_type: PacketType, payload: &[u8]) {
         let (pack_type, pack_type_len) = packet_type.as_proto();
         if pack_type_len + payload.len() > 823 {
             // TODO: error for invalid transmission type
@@ -204,7 +199,7 @@ fn spawn_reader<T: Tnc>(mut tnc: T, adapters: Arc<RwLock<Adapters>>) {
                             adapters.read().unwrap().packet.values().cloned().collect();
                         for s in subs {
                             s.packet_received(
-                                lsf.clone(),
+                                LinkSetup::new_raw(lsf.clone()),
                                 packet_type.clone(),
                                 packet_payload.clone(),
                             );
@@ -226,7 +221,7 @@ fn spawn_reader<T: Tnc>(mut tnc: T, adapters: Arc<RwLock<Adapters>>) {
                             let subs: Vec<_> =
                                 adapters.read().unwrap().stream.values().cloned().collect();
                             for s in subs {
-                                s.stream_began(lsf.clone());
+                                s.stream_began(LinkSetup::new_raw(lsf.clone()));
                             }
                         } else if n == 26 {
                             if !stream_running {