~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to examples/sqlite_server.cc

  • Committer: patrick crews
  • Date: 2011-06-08 03:02:27 UTC
  • mto: This revision was merged to the branch mainline in revision 2329.
  • Revision ID: gleebix@gmail.com-20110608030227-updkyv2652zvfajc
Initial voodoo worked to give us a crashme mode.  Need docs still

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>
120
121
      break;
121
122
 
122
123
    case 'v':
123
 
      server->verbose++;
 
124
      switch(server->verbose)
 
125
      {
 
126
      case DRIZZLE_VERBOSE_NEVER:
 
127
        server->verbose= DRIZZLE_VERBOSE_FATAL;
 
128
        break;
 
129
      case DRIZZLE_VERBOSE_FATAL:
 
130
        server->verbose= DRIZZLE_VERBOSE_ERROR;
 
131
        break;
 
132
      case DRIZZLE_VERBOSE_ERROR:
 
133
        server->verbose= DRIZZLE_VERBOSE_INFO;
 
134
        break;
 
135
      case DRIZZLE_VERBOSE_INFO:
 
136
        server->verbose= DRIZZLE_VERBOSE_DEBUG;
 
137
        break;
 
138
      case DRIZZLE_VERBOSE_DEBUG:
 
139
        server->verbose= DRIZZLE_VERBOSE_CRAZY;
 
140
        break;
 
141
      case DRIZZLE_VERBOSE_CRAZY:
 
142
      case DRIZZLE_VERBOSE_MAX:
 
143
        break;
 
144
      }
124
145
      break;
125
146
 
126
147
    default:
240
261
    if (data != NULL)
241
262
      free(data);
242
263
 
243
 
    data= drizzle_con_command_buffer(&(server->con), &command, &total, &ret);
 
264
    data= (uint8_t *)drizzle_con_command_buffer(&(server->con), &command, &total, &ret);
244
265
    if (ret == DRIZZLE_RETURN_LOST_CONNECTION ||
245
266
        (ret == DRIZZLE_RETURN_OK && command == DRIZZLE_COMMAND_QUIT))
246
267
    {