summaryrefslogtreecommitdiff
path: root/src/analysis/db/item.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-07-30 00:56:33 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-07-30 00:56:33 (GMT)
commita22b3a083c0b92de6b5d9b154773a26aeb99db0c (patch)
treeb4ef1a6ba9667adee68dc75a00efa594249c971e /src/analysis/db/item.c
parentf38e5a051b4d57e1cb9c1e503d2a8895e8532172 (diff)
Removed collection items by deactivating them using the activity timestamps.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@560 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/db/item.c')
-rw-r--r--src/analysis/db/item.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/analysis/db/item.c b/src/analysis/db/item.c
index 5463e85..3fc6f6f 100644
--- a/src/analysis/db/item.c
+++ b/src/analysis/db/item.c
@@ -191,8 +191,6 @@ void g_db_item_set_server_side(GDbItem *item)
init_timestamp(&item->created);
item->timestamp = item->created;
- item->server_side = true;
-
}
@@ -288,15 +286,11 @@ static bool g_db_item_recv_from_fd(GDbItem *item, int fd, int flags)
{
bool status; /* Bilan d'une réception */
- if (!item->server_side)
- {
- status = recv_timestamp(&item->created, fd, flags);
- if (!status) return false;
-
- status = recv_timestamp(&item->timestamp, fd, flags);
- if (!status) return false;
+ status = recv_timestamp(&item->created, fd, flags);
+ if (!status) return false;
- }
+ status = recv_timestamp(&item->timestamp, fd, flags);
+ if (!status) return false;
status = recv_rle_string(&item->author, fd, flags);
if (!status) return false;
@@ -354,15 +348,11 @@ static bool g_db_item_send_to_fd(const GDbItem *item, int fd, int flags)
{
bool status; /* Bilan d'une émission */
- if (item->server_side)
- {
- status = send_timestamp(&item->created, fd, MSG_MORE | flags);
- if (!status) return false;
-
- status = send_timestamp(&item->timestamp, fd, MSG_MORE | flags);
- if (!status) return false;
+ status = send_timestamp(&item->created, fd, MSG_MORE | flags);
+ if (!status) return false;
- }
+ status = send_timestamp(&item->timestamp, fd, MSG_MORE | flags);
+ if (!status) return false;
status = send_rle_string(&item->author, fd, MSG_MORE | flags);
if (!status) return false;