mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-24 10:26:25 +04:00
fix warnnings
This commit is contained in:
parent
2a4c7c2cc3
commit
7a87ce7cfa
@ -2,7 +2,9 @@ use alloc::{vec::Vec, sync::Arc};
|
|||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use lose_net_stack::packets::tcp::TCPPacket;
|
use lose_net_stack::packets::tcp::TCPPacket;
|
||||||
|
|
||||||
use crate::{sync::UPIntrFreeCell, fs::File, task::{TaskControlBlock, wakeup_task}};
|
use crate::fs::File;
|
||||||
|
use crate::sync::UPIntrFreeCell;
|
||||||
|
use crate::task::TaskControlBlock;
|
||||||
|
|
||||||
use super::tcp::TCP;
|
use super::tcp::TCP;
|
||||||
|
|
||||||
@ -83,7 +85,7 @@ pub fn check_accept(port: u16, tcp_packet: &TCPPacket) -> Option<()> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn accept_connection(port: u16, tcp_packet: &TCPPacket, task: Arc<TaskControlBlock>) {
|
pub fn accept_connection(_port: u16, tcp_packet: &TCPPacket, task: Arc<TaskControlBlock>) {
|
||||||
let process = task.process.upgrade().unwrap();
|
let process = task.process.upgrade().unwrap();
|
||||||
let mut inner = process.inner_exclusive_access();
|
let mut inner = process.inner_exclusive_access();
|
||||||
let fd = inner.alloc_fd();
|
let fd = inner.alloc_fd();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use crate::net::port_table::{listen, PortFd, accept, port_acceptable};
|
use crate::net::port_table::{listen, PortFd, accept, port_acceptable};
|
||||||
use crate::net::udp::UDP;
|
use crate::net::udp::UDP;
|
||||||
use crate::net::{IPv4, net_interrupt_handler};
|
use crate::net::{IPv4, net_interrupt_handler};
|
||||||
use crate::task::{current_process, block_current_and_run_next, current_task, current_trap_cx};
|
use crate::task::{current_process, current_task, current_trap_cx};
|
||||||
use alloc::sync::Arc;
|
use alloc::sync::Arc;
|
||||||
|
|
||||||
// just support udp
|
// just support udp
|
||||||
|
Loading…
Reference in New Issue
Block a user