~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/net_serv.c

  • Committer: Brian Aker
  • Date: 2008-07-16 19:07:12 UTC
  • Revision ID: brian@tangent.org-20080716190712-j81qrb76uu7qz8a7
If a read timeout exists, then set it up, otherwise just let the blocking
behavior do what it needs to do in a read().

Show diffs side-by-side

added added

removed removed

Lines of Context:
549
549
 
550
550
 
551
551
  /* Check for error, currently assert */
 
552
  if (net->read_timeout)
552
553
  {
553
554
    struct timeval waittime;
554
555
    socklen_t length;
635
636
  }
636
637
 
637
638
end:
638
 
  error= setsockopt(net->vio->sd, SOL_SOCKET, SO_RCVTIMEO, 
639
 
                    &backtime, (socklen_t)sizeof(struct timeval));
 
639
  if  (net->read_timeout)
 
640
    error= setsockopt(net->vio->sd, SOL_SOCKET, SO_RCVTIMEO, 
 
641
                      &backtime, (socklen_t)sizeof(struct timeval));
640
642
  assert(error == 0);
641
643
  net->reading_or_writing= 0;
642
644