~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_connect.cc

  • Committer: Monty Taylor
  • Date: 2009-02-08 11:11:30 UTC
  • mto: This revision was merged to the branch mainline in revision 852.
  • Revision ID: mordred@inaugust.com-20090208111130-futpwptxv5he3boe
Renamed non-prefixed things from libdrizzleclient to drizzleclient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
  {
164
164
    char ip[NI_MAXHOST];
165
165
 
166
 
    if (net_peer_addr(net, ip, &session->peer_port, NI_MAXHOST))
 
166
    if (drizzleclient_net_peer_addr(net, ip, &session->peer_port, NI_MAXHOST))
167
167
    {
168
168
      my_error(ER_BAD_HOST_ERROR, MYF(0), session->security_ctx.ip.c_str());
169
169
      return 1;
171
171
 
172
172
    session->security_ctx.ip.assign(ip);
173
173
  }
174
 
  net_keepalive(net, true);
 
174
  drizzleclient_net_keepalive(net, true);
175
175
 
176
176
  uint32_t server_capabilites;
177
177
  {
199
199
      procedure, scramble is set here. This gives us new scramble for
200
200
      each handshake.
201
201
    */
202
 
    create_random_string(session->scramble, SCRAMBLE_LENGTH, &session->rand);
 
202
    drizzleclient_create_random_string(session->scramble, SCRAMBLE_LENGTH, &session->rand);
203
203
    /*
204
204
      Old clients does not understand long scrambles, but can ignore packet
205
205
      tail: that's why first part of the scramble is placed here, and second
220
220
    end+= scramble_len + 1;
221
221
 
222
222
    /* At this point we write connection message and read reply */
223
 
    if (net_write_command(net, (unsigned char) protocol_version, (unsigned char*) "", 0,
 
223
    if (drizzleclient_net_write_command(net, (unsigned char) protocol_version, (unsigned char*) "", 0,
224
224
                          (unsigned char*) buff, (size_t) (end-buff)) ||
225
225
        (pkt_len= drizzleclient_net_read(net)) == packet_error ||
226
226
        pkt_len < MIN_HANDSHAKE_SIZE)
374
374
  lex_start(session);
375
375
 
376
376
  error= check_connection(session);
377
 
  net_end_statement(session);
 
377
  drizzleclient_net_end_statement(session);
378
378
 
379
379
  if (error)
380
380
  {                                             // Wrong permissions