[libgdata/libgdata-0-6] [core] Ensure newly-created entries can never be inserted if they have an ID



commit 607628bc9432e241737af96a46f18b91e99d83e4
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Mar 25 13:29:18 2010 +0000

    [core] Ensure newly-created entries can never be inserted if they have an ID
    
    It should not be possible to use gdata_service_insert_entry() on an entry
    created by the program which has an ID.

 gdata/gdata-entry.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gdata/gdata-entry.c b/gdata/gdata-entry.c
index 830651a..caff87e 100644
--- a/gdata/gdata-entry.c
+++ b/gdata/gdata-entry.c
@@ -863,9 +863,8 @@ gdata_entry_is_inserted (GDataEntry *self)
 {
 	g_return_val_if_fail (GDATA_IS_ENTRY (self), FALSE);
 
-	if (self->priv->id != NULL &&
-	    self->priv->links != NULL &&
-	    (self->priv->updated.tv_sec != 0 || self->priv->updated.tv_usec != 0))
+	if (self->priv->id != NULL ||
+	    self->priv->updated.tv_sec != 0 || self->priv->updated.tv_usec != 0)
 		return TRUE;
 	return FALSE;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]