Skip to content

Commit

Permalink
[server] Work around glib bug of g_object_set().
Browse files Browse the repository at this point in the history
  • Loading branch information
killing committed Jun 11, 2015
1 parent 13b2a57 commit 177ac3e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/rpc-service.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ convert_repo (SeafRepo *r)
"head_cmmt_id", r->head ? r->head->commit_id : NULL,
"root", r->root_id,
"version", r->version, "last_modify", r->last_modify,
NULL);
g_object_set (repo,
"repo_id", r->id, "repo_name", r->name,
"repo_desc", r->desc, "last_modified", r->last_modify,
NULL);
Expand Down
3 changes: 3 additions & 0 deletions server/repo-mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2568,6 +2568,7 @@ seaf_fill_repo_obj_from_commit (GList **repos)
commit = seaf_commit_manager_get_commit_compatible (seaf->commit_mgr,
repo_id, commit_id);
if (!commit) {
seaf_warning ("Commit %s not found in repo %s\n", commit_id, repo_id);
g_object_unref (repo);
next = p->next;
*repos = g_list_delete_link (*repos, p);
Expand All @@ -2577,6 +2578,8 @@ seaf_fill_repo_obj_from_commit (GList **repos)
"encrypted", commit->encrypted, "magic", commit->magic,
"enc_version", commit->enc_version, "root", commit->root_id,
"version", commit->version, "last_modify", commit->ctime,
NULL);
g_object_set (repo,
"repo_name", commit->repo_name, "repo_desc", commit->repo_desc,
"last_modified", commit->ctime, "repaired", commit->repaired, NULL);
if (commit->encrypted && commit->enc_version == 2)
Expand Down
2 changes: 2 additions & 0 deletions server/share-mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "common.h"
#include "utils.h"

#include "log.h"

#include "seafile-session.h"
#include "share-mgr.h"

Expand Down

0 comments on commit 177ac3e

Please sign in to comment.