Author: mturk Date: Thu Aug 11 15:06:47 2011 New Revision: 1156642 URL: http://svn.apache.org/viewvc?rev=1156642&view=rev Log: Fix solaris impl although Solaris does not support AF_LOCAL for sendfile. We might need to make the wrapper for that
Modified: commons/sandbox/runtime/trunk/src/main/native/os/solaris/sendfile.c Modified: commons/sandbox/runtime/trunk/src/main/native/os/solaris/sendfile.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/solaris/sendfile.c?rev=1156642&r1=1156641&r2=1156642&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/os/solaris/sendfile.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/os/solaris/sendfile.c Thu Aug 11 15:06:47 2011 @@ -52,11 +52,11 @@ ACR_NET_EXPORT(jint, Sendfile, send0)(JN ACR_THROW_NET_ERROR(ACR_EBADF); return -1; } - if (sf->info.st_size != 0) { - if ((sf->info.st_size - sf->off) > INT_MAX) + if (sf->size != 0) { + if ((sf->size - sf->off) > INT_MAX) cnt = INT_MAX; else - cnt = sf->info.st_size - sf->off; + cnt = sf->size - sf->off; } if (ACR_HASFLAG(sd, ACR_SO_WPART)) { ACR_CLRFLAG(sd, ACR_SO_WPART);