15 static void extractQueryData(
COMMAND_INFO *cmd, time_t *timeValuePtrPtr,
16 void **dataValuePtrPtr,
17 int *dataValueLengthPtr )
21 *dataValuePtrPtr = NULL;
22 *dataValueLengthPtr = 0;
34 *timeValuePtrPtr = ( time_t ) timeValuePtr[ 4 ] << 24 | \
35 ( time_t ) timeValuePtr[ 5 ] << 16 | \
36 ( time_t ) timeValuePtr[ 6 ] << 8 | \
37 ( time_t ) timeValuePtr[ 7 ];
39 *timeValuePtrPtr |= ( time_t ) timeValuePtr[ 3 ] << 32;
46 *dataValuePtrPtr = cmd->
strArg[ 2 ];
47 *dataValueLengthPtr = cmd->
strArgLen[ 2 ];
56 *dataValuePtrPtr = cmd->
strArg[ 1 ];
57 *dataValueLengthPtr = cmd->
strArgLen[ 1 ];
67 assert( cmd->
noArgs == 0 );
70 closeDatabase( stateInfo );
74 int cmdGetErrorInfo(
void *stateInfo,
COMMAND_INFO *cmd )
78 assert( cmd->
noArgs == 0 );
81 performErrorQuery( stateInfo, &cmd->
arg[ 0 ], cmd->
strArg[ 0 ] );
92 assert( cmd->
noArgs == 1 );
97 status = openDatabase( stateInfo, cmd->
strArg[ 0 ], cmd->
arg[ 0 ],
113 assert( cmd->
noArgs == 2 );
120 extractQueryData( cmd, &timeValue, &dataValue, &dataValueLength );
121 status = performQuery( stateInfo, cmd->
strArg[ 0 ],
122 cmd->
strArg[ argIndex ], &dataLength, dataValue,
123 dataValueLength, timeValue, cmd->
arg[ 1 ],
141 assert( cmd->
noArgs == 1 );
144 extractQueryData( cmd, &timeValue, &dataValue, &dataValueLength );
145 return( performUpdate( stateInfo, cmd->
strArg[ 0 ],
146 dataValueLength > 0 ? dataValue : NULL,
147 dataValueLength, timeValue, cmd->
arg[ 0 ] ) );
153 NULL, NULL, cmdOpen, cmdClose, cmdQuery, cmdUpdate, cmdGetErrorInfo };
155 void processCommand(
void *stateInfo,
BYTE *
buffer )
171 assert( NOTREACHED );
181 for( i = 0; i < cmd.
noArgs; i++ )
190 bufPtr += COMMAND_WORDSIZE + cmd.
strArgLen[ i ];
194 assert( NOTREACHED );
232 status = commandHandlers[ cmd.
type ]( stateInfo, &cmd );
254 const long dataLength = cmd.
strArgLen[ argIndex ];
264 cmd.
strArg[ argIndex ], dataLength );
274 const long dataLength = cmd.
strArgLen[ 0 ];