This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re[2]: [AVShutko@mail.khstu.ru: Re: BUG in sendto() function]


Hello egor duda,
Thursday, October 11, 2001, 9:08:09 PM, you wrote:

ed> Gosh, it looks like i was just plain stupid yesterday when i was
ed> looking at the code. everything is simpler than i thought.
ed> get_inet_addr works ok, the problem is nobody uses data it returns.
ed> i've just checked in the simple fix. you can either update sources
ed> from cvs and rebuild or wait for next snapshot. 
There was no new snapshots so i rebuild it by myself :) All works
ok... I tried fresh-compiled IServerd on heavy load and it is work
fine...

ed> Be warned, however, that there still is a problem with recvfrom() on
ed> AF_UNIX socket. recvfrom() is supposed to return peer address...
I think program that use recvfrom with datagram unix domain sockets
already know peer address :) I didn't ever seen programs that use
address structure from recvfrom in such situations....


P.S. Why don't you implement ualarm function in cygwin ?

####################################################################
u_int ualarm (u_int value, u_int interval)
{                                                                     
  struct itimerval timer, otimer;                                     
                                                                        
  timer.it_value.tv_sec = 0;                                          
  timer.it_value.tv_usec = value;                                     
  timer.it_interval.tv_sec = 0;                                       
  timer.it_interval.tv_usec = interval;                               
                                                                        
  if (setitimer (ITIMER_REAL, &timer, &otimer) < 0) return (u_int)-1;                                                 
                                                                  
  return (otimer.it_value.tv_sec * 1000000) + otimer.it_value.tv_usec;
}
####################################################################

-- 
With respect,
Alexandr V. Shutko                           mailto:AVShutko@mail.khstu.ru



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]