~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to examples/server.cc

  • Committer: Mark Atwood
  • Date: 2011-08-11 03:05:03 UTC
  • mfrom: (2385.1.12 refactor4)
  • Revision ID: me@mark.atwood.name-20110811030503-rp9xjihc5x3y0x4q
merge lp:~olafvdspek/drizzle/refactor4

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 *
35
35
 */
36
36
 
37
 
 
38
 
#include "config.h"
 
37
#include <config.h>
39
38
 
40
39
#include <errno.h>
41
40
#include <stdio.h>
233
232
  while (1)
234
233
  {
235
234
    drizzle_result_free(result);
236
 
    if (data != NULL)
237
 
      free(data);
 
235
    free(data);
238
236
 
239
237
    data= (uint8_t *)drizzle_con_command_buffer(con, &command, &total, &ret);
240
238
    if (ret == DRIZZLE_RETURN_LOST_CONNECTION ||
241
239
        (ret == DRIZZLE_RETURN_OK && command == DRIZZLE_COMMAND_QUIT))
242
240
    {
243
 
      if (data != NULL)
244
 
        free(data);
 
241
      free(data);
245
242
      return;
246
243
    }
247
244
    DRIZZLE_RETURN_CHECK(ret, "drizzle_con_command_buffer", drizzle)