I tried to use Ns_SockSendBufs() but it sends data directly to socket 
where i need to send via driver's send proc.

Why connPtr->nContentSent is not updated, all send called with conn 
parameters should do this

Stephen Deasey wrote:
>> Index: nsssl.c
>> ===================================================================
>> RCS file: /cvsroot/naviserver/modules/nsssl/nsssl.c,v
>> retrieving revision 1.6
>> retrieving revision 1.7
>> diff -C2 -d -r1.6 -r1.7
>> *** nsssl.c     22 Oct 2008 02:14:24 -0000      1.6
>> --- nsssl.c     22 Oct 2008 03:23:06 -0000      1.7
>> ***************
>> --- 432,447 ----
>>   */
>>
>> ! static int
>> ! SendBufs(SOCKET sock, struct iovec *bufs, int nbufs, Ns_Time *timeoutPtr, 
>> int flags)
>>  {
>> !     Ns_Conn *conn = Ns_GetConn();
>> !
>> !     return Ns_ConnSend(conn, bufs, nbufs);
>> ! }
>> !
> 
> 
> This should be Ns_SockSendBufs(), otherwise connPtr->nContentSent will
> be double counted and the driver thread may block.
> 
> Although in this case it should actually be Send(), which is your SSL
> specific implementation of Ns_SockSendBufs(). The way it is now static
> files may be sent in the clear :-/
> 
> 
> (Basically, you implement the SendFile() callback by calling
> Ns_SockSendFileIndirect(), which is the default library implementation
> which scrapes the bytes off disk, and pass it Send(), which is your
> implementation of writing to the network.  nssock is maybe a little
> confusing in that it doesn't actually do anything but call the default
> implementations, because it doesn't have to...)
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> naviserver-devel mailing list
> naviserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/naviserver-devel
> 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to