aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-10-23 20:54:43 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-10-23 20:54:43 +0800
commitbdaae91bfed75939e5fc0d406bd3372a24b49d8a (patch)
treeeba40354113bb27e47031af2bff30839be985009 /calendar/pcs
parentc1103e4a29d0f8ec59cefcfff2ff44dbce151262 (diff)
downloadgsoc2013-evolution-bdaae91bfed75939e5fc0d406bd3372a24b49d8a.tar
gsoc2013-evolution-bdaae91bfed75939e5fc0d406bd3372a24b49d8a.tar.gz
gsoc2013-evolution-bdaae91bfed75939e5fc0d406bd3372a24b49d8a.tar.bz2
gsoc2013-evolution-bdaae91bfed75939e5fc0d406bd3372a24b49d8a.tar.lz
gsoc2013-evolution-bdaae91bfed75939e5fc0d406bd3372a24b49d8a.tar.xz
gsoc2013-evolution-bdaae91bfed75939e5fc0d406bd3372a24b49d8a.tar.zst
gsoc2013-evolution-bdaae91bfed75939e5fc0d406bd3372a24b49d8a.zip
guard against irrelevant args (ie if there was an error)
2003-10-23 JP Rosevear <jpr@ximian.com> * pcs/cal.c (cal_notify_object_modified): guard against irrelevant args (ie if there was an error) (cal_notify_object_removed): ditto (cal_notify_timezone_added): ditto * pcs/cal-backend-sync.c (_cal_backend_is_read_only): init value to something known (_cal_backend_get_cal_address): ditto (_cal_backend_get_alarm_email_address): ditto (_cal_backend_get_ldap_attribute): ditto (_cal_backend_get_static_capabilities): ditto (_cal_backend_modify_object): ditto (_cal_backend_remove_object): ditto (_cal_backend_get_object_list): ditto 2003-10-22 JP Rosevear <jpr@ximian.com> * gui/e-cal-list-view.c (e_cal_list_view_new): create a model and pass it as an arg during creation * gui/e-day-view.c (e_day_view_new): unref the model * gui/e-week-view.c (e_week_view_new): ditto 2003-10-22 JP Rosevear <jpr@ximian.com> * cal-client/cal-client.c (cal_client_get_object): only change to invalid object error code if we got the object but couldn't parse it, and only check for timezones if we had success * gui/comp-util.c (cal_comp_is_on_server): don't throw a warning if the object simply does not exist svn path=/trunk/; revision=23032
Diffstat (limited to 'calendar/pcs')
-rw-r--r--calendar/pcs/cal-backend-sync.c16
-rw-r--r--calendar/pcs/cal.c6
2 files changed, 11 insertions, 11 deletions
diff --git a/calendar/pcs/cal-backend-sync.c b/calendar/pcs/cal-backend-sync.c
index 2a807ef689..9e7aec67e0 100644
--- a/calendar/pcs/cal-backend-sync.c
+++ b/calendar/pcs/cal-backend-sync.c
@@ -263,7 +263,7 @@ static void
_cal_backend_is_read_only (CalBackend *backend, Cal *cal)
{
CalBackendSyncStatus status;
- gboolean read_only;
+ gboolean read_only = TRUE;
status = cal_backend_sync_is_read_only (CAL_BACKEND_SYNC (backend), cal, &read_only);
@@ -274,7 +274,7 @@ static void
_cal_backend_get_cal_address (CalBackend *backend, Cal *cal)
{
CalBackendSyncStatus status;
- char *address;
+ char *address = NULL;
status = cal_backend_sync_get_cal_address (CAL_BACKEND_SYNC (backend), cal, &address);
@@ -287,7 +287,7 @@ static void
_cal_backend_get_alarm_email_address (CalBackend *backend, Cal *cal)
{
CalBackendSyncStatus status;
- char *address;
+ char *address = NULL;
status = cal_backend_sync_get_cal_address (CAL_BACKEND_SYNC (backend), cal, &address);
@@ -300,7 +300,7 @@ static void
_cal_backend_get_ldap_attribute (CalBackend *backend, Cal *cal)
{
CalBackendSyncStatus status;
- char *attribute;
+ char *attribute = NULL;
status = cal_backend_sync_get_cal_address (CAL_BACKEND_SYNC (backend), cal, &attribute);
@@ -313,7 +313,7 @@ static void
_cal_backend_get_static_capabilities (CalBackend *backend, Cal *cal)
{
CalBackendSyncStatus status;
- char *capabilities;
+ char *capabilities = NULL;
status = cal_backend_sync_get_cal_address (CAL_BACKEND_SYNC (backend), cal, &capabilities);
@@ -360,7 +360,7 @@ static void
_cal_backend_modify_object (CalBackend *backend, Cal *cal, const char *calobj, CalObjModType mod)
{
CalBackendSyncStatus status;
- char *old_object;
+ char *old_object = NULL;
status = cal_backend_sync_modify_object (CAL_BACKEND_SYNC (backend), cal,
calobj, mod, &old_object);
@@ -372,7 +372,7 @@ static void
_cal_backend_remove_object (CalBackend *backend, Cal *cal, const char *uid, const char *rid, CalObjModType mod)
{
CalBackendSyncStatus status;
- char *object;
+ char *object = NULL;
status = cal_backend_sync_remove_object (CAL_BACKEND_SYNC (backend), cal, uid, rid, mod, &object);
@@ -441,7 +441,7 @@ static void
_cal_backend_get_object_list (CalBackend *backend, Cal *cal, const char *sexp)
{
CalBackendSyncStatus status;
- GList *objects, *l;
+ GList *objects = NULL, *l;
status = cal_backend_sync_get_object_list (CAL_BACKEND_SYNC (backend), cal, sexp, &objects);
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c
index a88e9a146c..2651f0898e 100644
--- a/calendar/pcs/cal.c
+++ b/calendar/pcs/cal.c
@@ -826,7 +826,7 @@ cal_notify_object_modified (Cal *cal, GNOME_Evolution_Calendar_CallStatus status
queries = cal_backend_get_queries (priv->backend);
iter = e_list_get_iterator (queries);
- while (e_iterator_is_valid (iter)) {
+ while (object && old_object && e_iterator_is_valid (iter)) {
Query *query = QUERY (e_iterator_get (iter));
gboolean old_match, new_match;
@@ -881,7 +881,7 @@ cal_notify_object_removed (Cal *cal, GNOME_Evolution_Calendar_CallStatus status,
queries = cal_backend_get_queries (priv->backend);
iter = e_list_get_iterator (queries);
- while (e_iterator_is_valid (iter)) {
+ while (uid && object && e_iterator_is_valid (iter)) {
Query *query = QUERY (e_iterator_get (iter));
bonobo_object_dup_ref (BONOBO_OBJREF (query), NULL);
@@ -1127,7 +1127,7 @@ cal_notify_timezone_added (Cal *cal, GNOME_Evolution_Calendar_CallStatus status,
g_return_if_fail (priv->listener != CORBA_OBJECT_NIL);
CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Listener_notifyTimezoneAdded (priv->listener, status, tzid, &ev);
+ GNOME_Evolution_Calendar_Listener_notifyTimezoneAdded (priv->listener, status, tzid ? tzid : "", &ev);
if (BONOBO_EX (&ev))
g_warning (G_STRLOC ": could not notify the listener of timezone added");