~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to examples/server.c

  • Committer: Monty Taylor
  • Date: 2010-12-06 21:17:06 UTC
  • mto: (1977.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1980.
  • Revision ID: mordred@inaugust.com-20101206211706-iiuzzkxhh3fm10zf
Add ability to add a validation function to any sys_var. duh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 */
36
36
 
37
37
 
38
 
#include <config.h>
39
 
 
40
38
#include <errno.h>
41
39
#include <stdio.h>
42
40
#include <stdlib.h>
98
96
      break;
99
97
 
100
98
    case 'v':
101
 
      switch(verbose)
102
 
      {
103
 
      case DRIZZLE_VERBOSE_NEVER:
104
 
        verbose= DRIZZLE_VERBOSE_FATAL;
105
 
        break;
106
 
      case DRIZZLE_VERBOSE_FATAL:
107
 
        verbose= DRIZZLE_VERBOSE_ERROR;
108
 
        break;
109
 
      case DRIZZLE_VERBOSE_ERROR:
110
 
        verbose= DRIZZLE_VERBOSE_INFO;
111
 
        break;
112
 
      case DRIZZLE_VERBOSE_INFO:
113
 
        verbose= DRIZZLE_VERBOSE_DEBUG;
114
 
        break;
115
 
      case DRIZZLE_VERBOSE_DEBUG:
116
 
        verbose= DRIZZLE_VERBOSE_CRAZY;
117
 
        break;
118
 
      case DRIZZLE_VERBOSE_CRAZY:
119
 
      case DRIZZLE_VERBOSE_MAX:
120
 
        break;
121
 
      }
 
99
      verbose++;
122
100
      break;
123
101
 
124
102
    default:
236
214
    if (data != NULL)
237
215
      free(data);
238
216
 
239
 
    data= (uint8_t *)drizzle_con_command_buffer(con, &command, &total, &ret);
 
217
    data= drizzle_con_command_buffer(con, &command, &total, &ret);
240
218
    if (ret == DRIZZLE_RETURN_LOST_CONNECTION ||
241
219
        (ret == DRIZZLE_RETURN_OK && command == DRIZZLE_COMMAND_QUIT))
242
220
    {