~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to examples/sqlite_server.cc

  • Committer: Mark Atwood
  • Date: 2011-10-27 05:08:12 UTC
  • mfrom: (2445.1.11 rf)
  • Revision ID: me@mark.atwood.name-20111027050812-1icvs72lb0u4xdc4
mergeĀ lp:~olafvdspek/drizzle/refactor8

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 *
35
35
 */
36
36
 
 
37
#include <config.h>
37
38
 
38
39
#include <errno.h>
39
40
#include <stdio.h>
257
258
  while (1)
258
259
  {
259
260
    drizzle_result_free(&(server->result));
260
 
    if (data != NULL)
261
 
      free(data);
 
261
    free(data);
262
262
 
263
263
    data= (uint8_t *)drizzle_con_command_buffer(&(server->con), &command, &total, &ret);
264
264
    if (ret == DRIZZLE_RETURN_LOST_CONNECTION ||
265
265
        (ret == DRIZZLE_RETURN_OK && command == DRIZZLE_COMMAND_QUIT))
266
266
    {
267
 
      if (data != NULL)
268
 
        free(data);
 
267
      free(data);
269
268
      return;
270
269
    }
271
270
    DRIZZLE_RETURN_CHECK(ret, "drizzle_con_command_buffer", &(server->drizzle))