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

« back to all changes in this revision

Viewing changes to plugin/drizzle_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:
20
20
#include "config.h"
21
21
#include <drizzled/gettext.h>
22
22
#include <drizzled/error.h>
23
 
#include "drizzled/my_error.h"
24
23
#include <drizzled/query_id.h>
25
24
#include <drizzled/sql_state.h>
26
25
#include <drizzled/session.h>
638
637
 
639
638
    if (drizzleclient_net_peer_addr(&net, ip, &peer_port, NI_MAXHOST))
640
639
    {
641
 
      my_error(ER_BAD_HOST_ERROR, MYF(0), session->security_ctx.ip.c_str());
 
640
      my_error(ER_BAD_HOST_ERROR, MYF(0), session->getSecurityContext().getIp().c_str());
642
641
      return false;
643
642
    }
644
643
 
645
 
    session->security_ctx.ip.assign(ip);
 
644
    session->getSecurityContext().setIp(ip);
646
645
  }
647
646
  drizzleclient_net_keepalive(&net, true);
648
647
 
697
696
        ||    (pkt_len= drizzleclient_net_read(&net)) == packet_error 
698
697
        || pkt_len < MIN_HANDSHAKE_SIZE)
699
698
    {
700
 
      my_error(ER_HANDSHAKE_ERROR, MYF(0), session->security_ctx.ip.c_str());
 
699
      my_error(ER_HANDSHAKE_ERROR, MYF(0), session->getSecurityContext().getIp().c_str());
701
700
      return false;
702
701
    }
703
702
  }
719
718
 
720
719
  if (end >= (char*) net.read_pos + pkt_len + 2)
721
720
  {
722
 
    my_error(ER_HANDSHAKE_ERROR, MYF(0), session->security_ctx.ip.c_str());
 
721
    my_error(ER_HANDSHAKE_ERROR, MYF(0), session->getSecurityContext().getIp().c_str());
723
722
    return false;
724
723
  }
725
724
 
749
748
 
750
749
  if (passwd + passwd_len + db_len > (char *) net.read_pos + pkt_len)
751
750
  {
752
 
    my_error(ER_HANDSHAKE_ERROR, MYF(0), session->security_ctx.ip.c_str());
 
751
    my_error(ER_HANDSHAKE_ERROR, MYF(0), session->getSecurityContext().getIp().c_str());
753
752
    return false;
754
753
  }
755
754
 
761
760
    user_len-= 2;
762
761
  }
763
762
 
764
 
  session->security_ctx.user.assign(user);
 
763
  session->getSecurityContext().setUser(user);
765
764
 
766
765
  return session->checkUser(passwd, passwd_len, l_db);
767
766
}