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"); }
void seafile_session_prepare (SeafileSession *session) { /* load config */ session->sync_extra_temp_file = seafile_session_config_get_bool (session, KEY_SYNC_EXTRA_TEMP_FILE); /* Enable http sync by default. */ session->enable_http_sync = TRUE; session->disable_verify_certificate = seafile_session_config_get_bool (session, KEY_DISABLE_VERIFY_CERTIFICATE); session->use_http_proxy = seafile_session_config_get_bool(session, KEY_USE_PROXY); gboolean use_system_proxy = seafile_session_config_get_bool(session, "use_system_proxy"); if (use_system_proxy) { load_system_proxy(session); } else { session->http_proxy_type = seafile_session_config_get_string(session, KEY_PROXY_TYPE); session->http_proxy_addr = seafile_session_config_get_string(session, KEY_PROXY_ADDR); session->http_proxy_port = seafile_session_config_get_int(session, KEY_PROXY_PORT, NULL); session->http_proxy_username = seafile_session_config_get_string(session, KEY_PROXY_USERNAME); session->http_proxy_password = seafile_session_config_get_string(session, KEY_PROXY_PASSWORD); } /* Start mq manager earlier, so that we can send notifications * when start repo manager. */ seaf_mq_manager_init (session->mq_mgr); seaf_commit_manager_init (session->commit_mgr); seaf_fs_manager_init (session->fs_mgr); seaf_branch_manager_init (session->branch_mgr); seaf_filelock_manager_init (session->filelock_mgr); seaf_repo_manager_init (session->repo_mgr); seaf_clone_manager_init (session->clone_mgr); #ifndef SEAF_TOOL seaf_sync_manager_init (session->sync_mgr); #endif seaf_mq_manager_set_heartbeat_name (session->mq_mgr, "seafile.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; return 0; }
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; }