~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to examples/client.cc

  • Committer: Brian Aker
  • Date: 2011-11-26 23:14:59 UTC
  • mto: This revision was merged to the branch mainline in revision 2465.
  • Revision ID: brian@tangent.org-20111126231459-pa9i3arizevf0vlr
Remove con from being passed object.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
  drizzle_return_t ret;
101
101
  uint32_t x;
102
102
  int wait_for_connections= 0;
103
 
  drizzle_con_st *con;
104
103
  client_con_st *client_con;
105
104
  char *host= NULL;
106
105
  in_port_t port= 0;
221
220
  for (x= 0; x < client.client_con_count; x++)
222
221
  {
223
222
    /* This may fail if there is other initialization that fails. See docs. */
224
 
    con= drizzle_con_add_tcp(client.drizzle,
225
 
                              &(client.client_con_list[x].con),
226
 
                              host, port, user, password, db,
227
 
                              client.mysql_protocol
228
 
                              ? DRIZZLE_CON_MYSQL
229
 
                              : DRIZZLE_CON_NONE);
 
223
    drizzle_con_st *con= drizzle_con_add_tcp(client.drizzle,
 
224
                                             host, port, user, password, db,
 
225
                                             client.mysql_protocol
 
226
                                             ? DRIZZLE_CON_MYSQL
 
227
                                             : DRIZZLE_CON_NONE);
230
228
    if (con == NULL)
231
229
    {
232
230
      CLIENT_ERROR("drizzle_con_add_tcp", 0, &client);
248
246
      CLIENT_ERROR("drizzle_con_wait", ret, &client);
249
247
    }
250
248
 
 
249
    drizzle_con_st* con;
251
250
    while ((con= drizzle_con_ready(client.drizzle)) != NULL)
252
251
    {
253
252
      client_con= (client_con_st *)drizzle_con_context(con);