On Fri, Oct 03, 2014 at 10:49:27AM -0400, Andrew Piskorski wrote:
> Hm, the old AOLserver 4.0.7 version of Ns_GetTime() had a Windows
> ifdef which is entirely missing from Naviserver!  (See below.)

I added back that Windows-specific Ns_GetTime() here:

  
https://bitbucket.org/apiskors/naviserver/commits/51f1735d788d7b00adc797a7579272763ddd9bcf

With that change, "nsd -h" started working, but running nsd with any
other arguments now stops with a Windows pop-up box saying:

  Debug Assertion Failed!
  File: f:\dd\vctools\crt_bld\self_64_amd64\crt\src\strftime.c
  Line: 615
  Expression:  ((timeptr->tm_mday >= 1) && (timeptr->tm_mday <= 31))

Mysteriously, with that new next problem I can't seem to get any
plausible backtrace out of WinDbg.  However, strftime() only appears
three times in the entire Naviserver codebase, so I very strongly
suspect that it's actually hitting that assertion in LogTime() (in
nsd/log.c).

So in LogTime(), I added some simple printf's just before calling
strftime().  ptm->tm_mday and all the other struct members have a
value of -1.  That's because in ns_localtime(), localtime_s() returns
an EINVAL = 22 "Invalid argument" error code, and then sets all the
members to -1.

  http://msdn.microsoft.com/en-us/library/a442x3ye.aspx

The *tp and *clock values look like a correct time_t count of seconds
since the Unix epoch.  So perhaps something is wrong with the only
other argument ther to localtime_s():  &tlsPtr->ltbuf

But what?  Any ideas?

-- 
Andrew Piskorski <a...@piskorski.com>

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to