feat: 对接Python,暴露接口
This commit is contained in:
@@ -55,6 +55,11 @@ static int client_persist_message_to_disk(const message_t *msg, const char *inbo
|
||||
if (omni_write_file(path, msg->body, msg->body_len) != 0) {
|
||||
return -1;
|
||||
}
|
||||
} else if (msg->type == MSG_TYPE_BINARY) {
|
||||
snprintf(path, sizeof(path), "%s/%s-%" PRIu64 ".bin", inbox_dir, msg->from, msg->id);
|
||||
if (omni_write_file(path, msg->body, msg->body_len) != 0) {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user