|
|
|
@ -1512,3 +1512,40 @@ grpc_compression_algorithm grpc_call_compression_for_level( |
|
|
|
|
gpr_mu_unlock(&call->mu); |
|
|
|
|
return grpc_compression_algorithm_for_level(level, accepted_encodings); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const char *grpc_call_error_to_string(grpc_call_error error) { |
|
|
|
|
switch (error) { |
|
|
|
|
case GRPC_CALL_ERROR: |
|
|
|
|
return "GRPC_CALL_ERROR"; |
|
|
|
|
case GRPC_CALL_ERROR_ALREADY_ACCEPTED: |
|
|
|
|
return "GRPC_CALL_ERROR_ALREADY_ACCEPTED"; |
|
|
|
|
case GRPC_CALL_ERROR_ALREADY_FINISHED: |
|
|
|
|
return "GRPC_CALL_ERROR_ALREADY_FINISHED"; |
|
|
|
|
case GRPC_CALL_ERROR_ALREADY_INVOKED: |
|
|
|
|
return "GRPC_CALL_ERROR_ALREADY_INVOKED"; |
|
|
|
|
case GRPC_CALL_ERROR_BATCH_TOO_BIG: |
|
|
|
|
return "GRPC_CALL_ERROR_BATCH_TOO_BIG"; |
|
|
|
|
case GRPC_CALL_ERROR_INVALID_FLAGS: |
|
|
|
|
return "GRPC_CALL_ERROR_INVALID_FLAGS"; |
|
|
|
|
case GRPC_CALL_ERROR_INVALID_MESSAGE: |
|
|
|
|
return "GRPC_CALL_ERROR_INVALID_MESSAGE"; |
|
|
|
|
case GRPC_CALL_ERROR_INVALID_METADATA: |
|
|
|
|
return "GRPC_CALL_ERROR_INVALID_METADATA"; |
|
|
|
|
case GRPC_CALL_ERROR_NOT_INVOKED: |
|
|
|
|
return "GRPC_CALL_ERROR_NOT_INVOKED"; |
|
|
|
|
case GRPC_CALL_ERROR_NOT_ON_CLIENT: |
|
|
|
|
return "GRPC_CALL_ERROR_NOT_ON_CLIENT"; |
|
|
|
|
case GRPC_CALL_ERROR_NOT_ON_SERVER: |
|
|
|
|
return "GRPC_CALL_ERROR_NOT_ON_SERVER"; |
|
|
|
|
case GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE: |
|
|
|
|
return "GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE"; |
|
|
|
|
case GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH: |
|
|
|
|
return "GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH"; |
|
|
|
|
case GRPC_CALL_ERROR_TOO_MANY_OPERATIONS: |
|
|
|
|
return "GRPC_CALL_ERROR_TOO_MANY_OPERATIONS"; |
|
|
|
|
case GRPC_CALL_OK: |
|
|
|
|
return "GRPC_CALL_OK"; |
|
|
|
|
default: |
|
|
|
|
return "GRPC_CALL_ERROR_UNKNOW"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|