Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159135554
D12633.id33853.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
626 B
Referenced Files
None
Subscribers
None
D12633.id33853.diff
View Options
Index: sys/kern/kern_sendfile.c
===================================================================
--- sys/kern/kern_sendfile.c
+++ sys/kern/kern_sendfile.c
@@ -514,8 +514,6 @@
*so = (*sock_fp)->f_data;
if ((*so)->so_type != SOCK_STREAM)
return (EINVAL);
- if (((*so)->so_state & SS_ISCONNECTED) == 0)
- return (ENOTCONN);
return (0);
}
@@ -624,6 +622,12 @@
SOCKBUF_UNLOCK(&so->so_snd);
goto done;
}
+ if ((so->so_state & SS_ISCONNECTED) == 0) {
+ SOCKBUF_UNLOCK(&so->so_snd);
+ error = ENOTCONN;
+ goto done;
+ }
+
space = sbspace(&so->so_snd);
if (space < rem &&
(space <= 0 ||
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jun 11, 12:23 PM (8 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33878806
Default Alt Text
D12633.id33853.diff (626 B)
Attached To
Mode
D12633: match sendfile() error handling to send()
Attached
Detach File
Event Timeline
Log In to Comment