~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-2.0/handshake.cc

  • Committer: Mark Atwood
  • Date: 2011-11-22 17:04:41 UTC
  • mfrom: (2462.1.3 drizzle-include)
  • Revision ID: me@mark.atwood.name-20111122170441-5dehm0e0ax20z19b
mergeĀ lp:~brianaker/drizzle/fedora-16-fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
572
572
 
573
573
drizzle_return_t drizzle_state_handshake_result_read(drizzle_con_st *con)
574
574
{
575
 
  drizzle_result_st *result;
 
575
  drizzle_result_st result;
576
576
 
577
577
  drizzle_log_debug(con->drizzle, "drizzle_state_handshake_result_read");
578
578
 
579
 
  if ((result= drizzle_result_create(con)) == NULL)
 
579
  if (drizzle_result_create(con, &result) == NULL)
580
580
  {
581
581
    return DRIZZLE_RETURN_MEMORY;
582
582
  }
583
583
 
584
 
  con->result= result;
 
584
  con->result= &result;
585
585
 
586
586
  drizzle_return_t ret= drizzle_state_result_read(con);
587
587
  if (drizzle_state_none(con))
588
588
  {
589
589
    if (ret == DRIZZLE_RETURN_OK)
590
590
    {
591
 
      if (drizzle_result_eof(result))
 
591
      if (drizzle_result_eof(&result))
592
592
      {
593
593
        drizzle_set_error(con->drizzle, "drizzle_state_handshake_result_read",
594
594
                         "old insecure authentication mechanism not supported");
595
595
        ret= DRIZZLE_RETURN_AUTH_FAILED;
596
596
      }
597
597
      else
598
 
      {
599
598
        con->options|= DRIZZLE_CON_READY;
600
 
      }
601
599
    }
602
600
  }
603
601
 
604
 
  drizzle_result_free(result);
 
602
  drizzle_result_free(&result);
605
603
 
606
604
  if (ret == DRIZZLE_RETURN_ERROR_CODE)
607
605
  {