diff --git a/NT/Release/elconv.exe b/NT/Release/elconv.exe new file mode 100644 index 00000000..9d33dd69 Binary files /dev/null and b/NT/Release/elconv.exe differ diff --git a/NT/Release/elog.exe b/NT/Release/elog.exe new file mode 100644 index 00000000..dd134773 Binary files /dev/null and b/NT/Release/elog.exe differ diff --git a/NT/Release/elogd.exe b/NT/Release/elogd.exe new file mode 100644 index 00000000..97944179 Binary files /dev/null and b/NT/Release/elogd.exe differ diff --git a/NT/elogd.vcxproj b/NT/elogd.vcxproj index 93f8a08a..5f00a8a7 100644 --- a/NT/elogd.vcxproj +++ b/NT/elogd.vcxproj @@ -55,7 +55,7 @@ Disabled - \openssl\include;\mxml;\krb5\inc\krb5;%(AdditionalIncludeDirectories) + \openssl\include;\mxml;\krb5\inc\krb5;\elog;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_SSL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -165,8 +165,6 @@ - - diff --git a/NT/elogd.vcxproj.filters b/NT/elogd.vcxproj.filters index 8a3f1323..807218f8 100644 --- a/NT/elogd.vcxproj.filters +++ b/NT/elogd.vcxproj.filters @@ -17,9 +17,6 @@ {f61d8ff6-47d2-4a74-9ee5-287870f8f9e6} h;hpp;hxx;hm;inl - - {f1a62f8d-a52e-459b-9dae-727ade5fa0eb} - @@ -66,12 +63,6 @@ Documentation - - FCKedit - - - FCKedit - Documentation diff --git a/NT/msvcr100.dll b/NT/msvcr100.dll new file mode 100644 index 00000000..329b1114 Binary files /dev/null and b/NT/msvcr100.dll differ diff --git a/NT/msvcr110.dll b/NT/msvcr110.dll new file mode 100644 index 00000000..dd484a58 Binary files /dev/null and b/NT/msvcr110.dll differ diff --git a/NT/msvcr90.dll b/NT/msvcr90.dll new file mode 100644 index 00000000..072bc0b4 Binary files /dev/null and b/NT/msvcr90.dll differ diff --git a/build.bat b/build.bat index 67d83f76..10b13784 100755 --- a/build.bat +++ b/build.bat @@ -4,6 +4,8 @@ rem Build ELOG distribution set version=%1 +call makegit.bat + cl /O2 /Ob2 /Oi /Ot /I "\mxml" /I "\openssl\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /D "HAVE_SSL" /GF /FD /EHsc /MT /Gy /Fo".\NT\Release/" /W3 /nologo /c /Zi /TC src\elogd.c cl /O2 /Ob2 /Oi /Ot /I "\mxml" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /GF /FD /EHsc /MT /Gy /Fo".\NT\Release/" /w /nologo /c /Zi /TC src\regex.c cl /O2 /Ob2 /Oi /Ot /I "\mxml" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /GF /FD /EHsc /MT /Gy /Fo".\NT\Release/" /w /nologo /c /Zi /TC src\crypt.c @@ -11,19 +13,19 @@ cl /O2 /Ob2 /Oi /Ot /I "\mxml" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SEC cl /O2 /Ob2 /Oi /Ot /I "\mxml" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /GF /FD /EHsc /MT /Gy /Fo".\NT\Release/" /W3 /nologo /c /Zi /TC \mxml\mxml.c cl /O2 /Ob2 /Oi /Ot /I "\mxml" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /GF /FD /EHsc /MT /Gy /Fo".\NT\Release/" /W3 /nologo /c /Zi /TC \mxml\strlcpy.c -link "/OUT:.\NT\Release/elogd.exe" /INCREMENTAL:NO /DEBUG /SUBSYSTEM:CONSOLE /STACK:4000000 /MACHINE:X86 wsock32.lib advapi32.lib ".\NT\Release\elogd.obj" ".\NT\Release\mxml.obj" ".\NT\Release\regex.obj" ".\NT\Release\crypt.obj" ".\NT\Release\auth.obj" ".\NT\Release\strlcpy.obj" "\openssl\lib\vc\ssleay32MD.lib" "\openssl\lib\vc\libeay32MD.lib" "\krb5\lib\i386\krb5_32.lib" +link "/OUT:.\NT\Release/elogd.exe" /INCREMENTAL:NO /DEBUG /SUBSYSTEM:CONSOLE /STACK:4000000 /MACHINE:X86 wsock32.lib advapi32.lib ".\NT\Release\elogd.obj" ".\NT\Release\mxml.obj" ".\NT\Release\regex.obj" ".\NT\Release\crypt.obj" ".\NT\Release\auth.obj" ".\NT\Release\strlcpy.obj" "\openssl\lib\vc\ssleay32MD.lib" "\openssl\lib\vc\libeay32MD.lib" cl /O2 /Ob2 /Oi /Ot /I "\mxml" /I "\openssl\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /D "HAVE_SSL" /GF /FD /EHsc /MT /Gy /Fo".\NT\Release/" /W3 /nologo /c /Zi /TC src\elog.c -link "/OUT:.\NT\Release/elog.exe" /INCREMENTAL:NO /DEBUG /SUBSYSTEM:CONSOLE /MACHINE:X86 wsock32.lib ".\NT\Release\elog.obj" ".\NT\Release\crypt.obj" "\openssl\lib\vc\ssleay32MD.lib" "\openssl\lib\vc\libeay32MD.lib" +link "/OUT:.\NT\Release/elog.exe" /INCREMENTAL:NO /DEBUG /SUBSYSTEM:CONSOLE /MACHINE:X86 wsock32.lib ".\NT\Release\elog.obj" ".\NT\Release\crypt.obj" ".\NT\Release\strlcpy.obj" "\openssl\lib\vc\ssleay32MD.lib" "\openssl\lib\vc\libeay32MD.lib" cl /O2 /Ob2 /Oi /Ot /I "\mxml" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /GF /FD /EHsc /MT /Gy /Fo".\NT\Release/" /W3 /nologo /c /Zi /TC src\elconv.c link "/OUT:.\NT\Release/elconv.exe" /INCREMENTAL:NO /DEBUG /SUBSYSTEM:CONSOLE /MACHINE:X86 wsock32.lib ".\NT\Release\elconv.obj" "\program files (x86)\NSIS\makensis" /DVERSION=%version% elog.nsi -scp elog%version%.exe ritt@llc:html/elog/download/windows/ -scp elog%version%.exe ritt@llc:html/elog/download/windows/elog-latest.exe -scp doc/*.html ritt@llc:html/elog/ -scp doc/index_nd.html ritt@llc:html/elog/index.html -ssh ritt@llc chmod 666 html/elog/download/windows/elog%version%.exe -ssh ritt@llc chmod 666 html/elog/download/windows/elog-latest.exe +\cygwin\bin\scp elog%version%.exe ritt@llc:html/elog/download/windows/ +\cygwin\bin\scp elog%version%.exe ritt@llc:html/elog/download/windows/elog-latest.exe +\cygwin\bin\scp doc/*.html ritt@llc:html/elog/ +\cygwin\bin\scp doc/index_nd.html ritt@llc:html/elog/index.html +\cygwin\bin\ssh ritt@llc chmod 666 html/elog/download/windows/elog%version%.exe +\cygwin\bin\ssh ritt@llc chmod 666 html/elog/download/windows/elog-latest.exe diff --git a/elog.nsi b/elog.nsi index d3242245..ab88747d 100755 --- a/elog.nsi +++ b/elog.nsi @@ -75,6 +75,7 @@ Section "ELOG system (required)" SecSystem File \windows\system32\ssleay32.dll File nt\msvcr90.dll File nt\msvcr100.dll + File nt\msvcr110.dll ; doc directory SetOutPath $INSTDIR\doc @@ -82,9 +83,7 @@ Section "ELOG system (required)" SecSystem ; script directory SetOutPath $INSTDIR\scripts - File /r /x .svn /x fckeditor.zip /x fckeditor_dist scripts\*.* - SetOutPath $INSTDIR\scripts\fckeditor - File /r scripts\fckeditor_dist\*.* + File /r scripts\*.* ; resources directory SetOutPath $INSTDIR\resources @@ -125,11 +124,11 @@ Section "ELOG system (required)" SecSystem themesNotOverwrite: ; demo logbook - IfFileExists $INSTDIR\logbooks\demo\011108a.log 0 logbNotExist + IfFileExists $INSTDIR\logbooks\demo\2001\011108a.log 0 logbNotExist MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to overwrite your existing demo logbook?" IDNO logbNotOverwrite logbNotExist: - SetOutPath $INSTDIR\logbooks\demo - File logbooks\demo\* + SetOutPath $INSTDIR\logbooks\demo\2001 + File logbooks\demo\2001\* logbNotOverwrite: SetOutPath $INSTDIR diff --git a/makegit b/makegit new file mode 100644 index 00000000..79056e58 --- /dev/null +++ b/makegit @@ -0,0 +1 @@ +echo \#define GIT_REVISION \"`git log -n 1 --pretty=format:'%ad - %h' --date=short`\" diff --git a/makegit.bat b/makegit.bat new file mode 100644 index 00000000..644c6937 --- /dev/null +++ b/makegit.bat @@ -0,0 +1 @@ +/cygwin/bin/sh -c /cygdrive/c/elog/makegit > c:\elog\git-revision.h diff --git a/src/elogd.c b/src/elogd.c index 3b4c1665..cc1a5b05 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -1768,32 +1768,57 @@ int setuser(char *str) /*-------------------------------------------------------------------*/ -int send_with_timeout(void *p, int sock, char *buf, int size) +int send_with_timeout(void *p, int sock, char *buf, int buf_size) { - int status; + int status, sent, send_size, send_packet; time_t start, now; + char *pbuf; time(&start); + sent = 0; + send_size = buf_size; + pbuf = buf; do { + if (send_size > 65536) + send_packet = 65536; + else + send_packet = send_size; + #ifdef HAVE_SSL SSL *ssl = (SSL *)p; if (ssl) - status = SSL_write(ssl, buf, size); + status = SSL_write(ssl, pbuf, send_packet); else #endif - status = send(sock, buf, size, 0); - - time(&now); + status = send(sock, pbuf, send_packet, 0); - // abort after 10 seconds - if (now > start+10) + // abort after 30 seconds + time(&now); + if (now > start+30) { + printf("Timeout after 30 seconds\n"); break; + } // repeat if we were interrupted by alarm() signal - } while (status == -1 && errno == EINTR); + if (status == -1 && errno == EINTR) { + continue; + } + + if (status == -1) + break; + + if (status > 0) + sent += status; + + if (status > 0 && sent < buf_size) { + pbuf += status; + send_size -= status; + } + + } while (sent < buf_size); - return 0; + return sent; } /*-------------------------------------------------------------------*/