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



commit 4193e1819b4d05a97c54803a71e1f4ff0f1df974
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 f472532..d919f8b 100644
--- a/gdata/gdata-entry.c
+++ b/gdata/gdata-entry.c
@@ -813,9 +813,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]