[ntp:questions] Ntpdc crashes when prompting for keyid on Windows

Ginni Misra misraginni at yahoo.com
Sat Jun 7 04:17:09 UTC 2008


Hi, 

I am using Ntp version 4.2.5p82 on Windows. 

I am using ntpdc to dynamically add a peer. I am issuing the following command: 
ntpdc> addpeer <IP address> 

Once, I press enter, ntpdc crashes. 
I traced the problem to the line 
if ((fi = _fdopen((int)GetStdHandle(STD_INPUT_HANDLE), "r")) == NULL) 
in the getkeyid function in ntpdc.c file. 

Tracing further, i found the condition (_osfile(filedes) & FOPEN) was not true 
Line 56: fdopen.c: _VALIDATE_RETURN((_osfile(filedes) & FOPEN), EBADF, NULL); 

Has anybody faced this issue or am I missing something?
 
Thanks! 



      


More information about the questions mailing list