void seafile_session_init (SeafileSession *session) { seaf_commit_manager_init (session->commit_mgr); seaf_fs_manager_init (session->fs_mgr); seaf_branch_manager_init (session->branch_mgr); seaf_repo_manager_init (session->repo_mgr); seaf_quota_manager_init (session->quota_mgr); seaf_mq_manager_init (session->mq_mgr); seaf_mq_manager_set_heartbeat_name (session->mq_mgr, "seaf_server.heartbeat"); }
int seafile_session_init (SeafileSession *session) { if (seaf_commit_manager_init (session->commit_mgr) < 0) return -1; if (seaf_fs_manager_init (session->fs_mgr) < 0) return -1; if (seaf_branch_manager_init (session->branch_mgr) < 0) return -1; if (seaf_repo_manager_init (session->repo_mgr) < 0) return -1; if (seaf_quota_manager_init (session->quota_mgr) < 0) return -1; seaf_mq_manager_init (session->mq_mgr); seaf_mq_manager_set_heartbeat_name (session->mq_mgr, "seaf_server.heartbeat"); return 0; }