This function will execute any fully parsed commands pending on * the client. Returns C_ERR if the client is no longer valid after executing * the command, and C_OK for all other cases. */
| 2059 | * the client. Returns C_ERR if the client is no longer valid after executing |
| 2060 | * the command, and C_OK for all other cases. */ |
| 2061 | int processPendingCommandsAndResetClient(client *c) { |
| 2062 | if (c->flags & CLIENT_PENDING_COMMAND) { |
| 2063 | c->flags &= ~CLIENT_PENDING_COMMAND; |
| 2064 | if (processCommandAndResetClient(c) == C_ERR) { |
| 2065 | return C_ERR; |
| 2066 | } |
| 2067 | } |
| 2068 | return C_OK; |
| 2069 | } |
| 2070 | |
| 2071 | /* This function is called every time, in the client structure 'c', there is |
| 2072 | * more query buffer to process, because we read more data from the socket |
no test coverage detected