~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-1.0/t/client_server.c

  • Committer: Brian Aker
  • Date: 2011-12-16 06:32:39 UTC
  • mto: (2478.1.1 drizzle-build)
  • mto: This revision was merged to the branch mainline in revision 2474.
  • Revision ID: brian@tangent.org-20111216063239-hgrxmt1ginuvxpqv
Formatting, and valgrind cleanups (just mismatch of free/delete).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
 
1
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
2
 *
2
3
 * Drizzle Client & Protocol Library
3
4
 *
4
5
 * Copyright (C) 2008 Eric Day (eday@oddments.org)
105
106
 
106
107
  drizzle_test("drizzle_create");
107
108
  if (drizzle_create(&drizzle) == NULL)
 
109
  {
108
110
    drizzle_test_error("returned NULL");
 
111
  }
109
112
 
110
113
  drizzle_test("drizzle_con_add_tcp_listen");
111
114
  if (drizzle_con_add_tcp_listen(&drizzle, &listen_con, DRIZZLE_TEST_HOST,
160
163
    drizzle_test("drizzle_con_wait");
161
164
    ret= drizzle_con_wait(&drizzle);
162
165
    if (ret != DRIZZLE_RETURN_OK)
 
166
    {
163
167
      drizzle_test_error("returned %s (%d)", drizzle_error(&drizzle), ret);
 
168
    }
164
169
  }
165
170
 
166
171
  if (server_accepted)
212
217
      return;
213
218
    }
214
219
    else if (ret != DRIZZLE_RETURN_OK)
 
220
    {
215
221
      drizzle_test_error("returned %s (%d)", drizzle_con_error(con), ret);
 
222
    }
216
223
 
217
224
  case SERVER_STATE_HANDSHAKE_READ:
218
225
    drizzle_test("drizzle_handshake_client_read");
223
230
      return;
224
231
    }
225
232
    else if (ret != DRIZZLE_RETURN_OK)
 
233
    {
226
234
      drizzle_test_error("returned %s (%d)", drizzle_con_error(con), ret);
 
235
    }
227
236
 
228
237
    drizzle_test("drizzle_result_create");
229
238
    if (drizzle_result_create(con, &state->result) == NULL)