~jaypipes/drizzle/split-xa-resource-manager

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/oldlibdrizzle.cc

  • Committer: Jay Pipes
  • Date: 2010-02-14 20:26:43 UTC
  • mfrom: (1273.1.27 staging)
  • Revision ID: jpipes@serialcoder-20100214202643-ahuqvc8rhn8u7y33
Merge trunk and resolve conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
623
623
 
624
624
    if (drizzleclient_net_peer_addr(&net, ip, &peer_port, NI_MAXHOST))
625
625
    {
626
 
      my_error(ER_BAD_HOST_ERROR, MYF(0), session->security_ctx.ip.c_str());
 
626
      my_error(ER_BAD_HOST_ERROR, MYF(0), session->getSecurityContext().getIp().c_str());
627
627
      return false;
628
628
    }
629
629
 
630
 
    session->security_ctx.ip.assign(ip);
 
630
    session->getSecurityContext().setIp(ip);
631
631
  }
632
632
  drizzleclient_net_keepalive(&net, true);
633
633
 
682
682
        ||    (pkt_len= drizzleclient_net_read(&net)) == packet_error 
683
683
        || pkt_len < MIN_HANDSHAKE_SIZE)
684
684
    {
685
 
      my_error(ER_HANDSHAKE_ERROR, MYF(0), session->security_ctx.ip.c_str());
 
685
      my_error(ER_HANDSHAKE_ERROR, MYF(0), session->getSecurityContext().getIp().c_str());
686
686
      return false;
687
687
    }
688
688
  }
704
704
 
705
705
  if (end >= (char*) net.read_pos + pkt_len + 2)
706
706
  {
707
 
    my_error(ER_HANDSHAKE_ERROR, MYF(0), session->security_ctx.ip.c_str());
 
707
    my_error(ER_HANDSHAKE_ERROR, MYF(0), session->getSecurityContext().getIp().c_str());
708
708
    return false;
709
709
  }
710
710
 
734
734
 
735
735
  if (passwd + passwd_len + db_len > (char *) net.read_pos + pkt_len)
736
736
  {
737
 
    my_error(ER_HANDSHAKE_ERROR, MYF(0), session->security_ctx.ip.c_str());
 
737
    my_error(ER_HANDSHAKE_ERROR, MYF(0), session->getSecurityContext().getIp().c_str());
738
738
    return false;
739
739
  }
740
740
 
746
746
    user_len-= 2;
747
747
  }
748
748
 
749
 
  session->security_ctx.user.assign(user);
 
749
  session->getSecurityContext().setUser(user);
750
750
 
751
751
  return session->checkUser(passwd, passwd_len, l_db);
752
752
}