~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/oldlibdrizzle/net_serv.cc

  • Committer: Brian Aker
  • Date: 2009-04-09 21:17:19 UTC
  • mfrom: (971.3.24 eday-dev)
  • Revision ID: brian@gaz-20090409211719-brkgflx5sc3oqhtz
MergeĀ Eric

Show diffs side-by-side

added added

removed removed

Lines of Context:
477
477
  uint32_t retry_count= 0;
478
478
 
479
479
  /* Backup of the original SO_RCVTIMEO timeout */
 
480
#ifdef WE_DONT_NEED_THIS_IN_DRIZZLED
480
481
#ifndef __sun
481
482
  struct timespec backtime;
482
483
  int error;
483
484
#endif
 
485
#endif
484
486
 
485
487
  if (net->error == 2)
486
488
    return(-1);                /* socket can't be used */
534
536
    packet= b;
535
537
  }
536
538
 
 
539
#ifdef WE_DONT_NEED_THIS_IN_DRIZZLED
537
540
#ifndef __sun
538
541
  /* Check for error, currently assert */
539
542
  if (net->write_timeout)
558
561
    assert(error == 0);
559
562
  }
560
563
#endif
 
564
#endif
561
565
 
562
566
  pos= packet;
563
567
  end=pos+len;
610
614
    free((char*) packet);
611
615
  net->reading_or_writing=0;
612
616
 
 
617
#ifdef WE_DONT_NEED_THIS_IN_DRIZZLED
613
618
#ifndef __sun
614
619
  if (net->write_timeout)
615
620
    error= setsockopt(net->vio->sd, SOL_SOCKET, SO_RCVTIMEO,
616
621
                      &backtime, (socklen_t)sizeof(struct timespec));
617
622
#endif
 
623
#endif
618
624
 
619
625
  return(((int) (pos != end)));
620
626
}
639
645
  uint32_t remain= (net->compress ? NET_HEADER_SIZE+COMP_HEADER_SIZE :
640
646
                    NET_HEADER_SIZE);
641
647
 
 
648
#ifdef WE_DONT_NEED_THIS_IN_DRIZZLED
642
649
#ifndef __sun
643
650
  /* Backup of the original SO_RCVTIMEO timeout */
644
651
  struct timespec backtime;
645
652
  int error= 0;
646
653
#endif
 
654
#endif
647
655
 
648
656
  *complen = 0;
649
657
 
653
661
  pos = net->buff + net->where_b;        /* net->packet -4 */
654
662
 
655
663
 
 
664
#ifdef WE_DONT_NEED_THIS_IN_DRIZZLED
656
665
#ifndef __sun
657
666
  /* Check for error, currently assert */
658
667
  if (net->read_timeout)
677
686
    assert(error == 0);
678
687
  }
679
688
#endif
 
689
#endif
680
690
 
681
691
  for (i= 0; i < 2 ; i++)
682
692
  {
746
756
  }
747
757
 
748
758
end:
 
759
#ifdef WE_DONT_NEED_THIS_IN_DRIZZLED
749
760
#ifndef __sun
750
761
  if  (net->vio->sd >= 0 && net->read_timeout)
751
762
  {
754
765
    assert(error == 0);
755
766
  }
756
767
#endif
 
768
#endif
757
769
  net->reading_or_writing= 0;
758
770
 
759
771
  return(len);