~linuxjedi/libdrizzle/5.1-tests

« back to all changes in this revision

Viewing changes to libdrizzle/drizzle.cc

  • Committer: Andrew Hutchings
  • Date: 2012-12-19 12:44:26 UTC
  • mfrom: (50.1.2 libdrizzle-5.1)
  • Revision ID: andrew@linuxjedi.co.uk-20121219124426-8fk29z8u5p24inly
Merge in C++ compiling

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
  sigaction(SIGPIPE, &act, NULL);
112
112
#endif
113
113
 
114
 
  drizzle= malloc(sizeof(drizzle_st));
 
114
  drizzle= (drizzle_st*)malloc(sizeof(drizzle_st));
115
115
  if (drizzle == NULL)
116
116
  {
117
117
    return NULL;
219
219
{
220
220
  if (drizzle == NULL)
221
221
  {
222
 
    return 0;
 
222
    return DRIZZLE_NONE;
223
223
  }
224
224
 
225
 
  return drizzle->options;
 
225
  return drizzle_options_t(drizzle->options);
226
226
}
227
227
 
228
228
void drizzle_set_options(drizzle_st *drizzle, drizzle_options_t options)
310
310
{
311
311
  if (drizzle == NULL)
312
312
  {
313
 
    return 0;
 
313
    return DRIZZLE_VERBOSE_NEVER;
314
314
  }
315
315
 
316
316
  return drizzle->verbose;
360
360
    return NULL;
361
361
  }
362
362
 
363
 
  con= malloc(sizeof(drizzle_con_st));
 
363
  con= (drizzle_con_st*)malloc(sizeof(drizzle_con_st));
364
364
  if (con == NULL)
365
365
  {
366
366
    if (drizzle != NULL)
389
389
  con->revents= 0;
390
390
  con->capabilities= DRIZZLE_CAPABILITIES_NONE;
391
391
  con->charset= 0;
392
 
  con->command= 0;
 
392
  con->command= DRIZZLE_COMMAND_SLEEP;
393
393
  con->socket_type= DRIZZLE_CON_SOCKET_TCP;
394
394
  con->status= DRIZZLE_CON_STATUS_NONE;
395
395
  con->max_packet_size= DRIZZLE_MAX_PACKET_SIZE;