patch-2.3.30 linux/net/khttpd/datasending.c
Next file: linux/net/khttpd/main.c
Previous file: linux/net/irda/irproc.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Mon Dec 6 17:06:50 1999
- Orig file:
v2.3.29/linux/net/khttpd/datasending.c
- Orig date:
Tue Aug 31 17:29:15 1999
diff -u --recursive --new-file v2.3.29/linux/net/khttpd/datasending.c linux/net/khttpd/datasending.c
@@ -55,16 +55,23 @@
It sends the data to the socket indicated by desc->buf.
*/
-static int sock_send_actor(read_descriptor_t * desc, const char *area, unsigned long size)
+static int sock_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size)
{
int written;
+ unsigned long kaddr;
unsigned long count = desc->count;
struct socket *sock = (struct socket *) desc->buf;
+ mm_segment_t old_fs;
if (size > count)
size = count;
- written = SendBuffer_async(sock,(char *)area,size);
+ old_fs = get_fs();
+ set_fs(KERNEL_DS);
+ kaddr = kmap(page);
+ written = SendBuffer_async(sock,(char *)kaddr + offset,size);
+ kunmap(page);
+ set_fs(old_fs);
if (written < 0) {
desc->error = written;
written = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)