diff options
| author | Matthew Barnes <mbarnes@redhat.com> | 2007-03-26 21:01:03 +0000 |
|---|---|---|
| committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-03-26 21:01:03 +0000 |
| commit | 8a9e1a709d17783f79ab46f147f5aac565f06034 (patch) | |
| tree | 1d003dec10605e28b5ce8dc3fbf4603110f65113 | |
| parent | ecc13cce81190dd2be134ececc133d8eae157a2c (diff) | |
| download | evolution-data-server-8a9e1a709d17783f79ab46f147f5aac565f06034.tar.gz | |
Don't mix declarations and code (#405495). Patch from Jens Granseuer.
2007-03-26 Matthew Barnes <mbarnes@redhat.com>
* camel/providers/pop3/camel-pop3-folder.c:
* camel/providers/groupwise/camel-groupwise-folder.c:
* camel/providers/groupwise/camel-groupwise-utils.c:
* camel/providers/imap/camel-imap-utils.c:
Don't mix declarations and code (#405495).
Patch from Jens Granseuer.
svn path=/trunk/; revision=7667
| -rw-r--r-- | addressbook/ChangeLog | 7 | ||||
| -rw-r--r-- | addressbook/backends/groupwise/e-book-backend-groupwise.c | 39 | ||||
| -rw-r--r-- | addressbook/libedata-book/e-book-backend-cache.c | 3 | ||||
| -rw-r--r-- | calendar/ChangeLog | 7 | ||||
| -rw-r--r-- | calendar/backends/groupwise/e-cal-backend-groupwise.c | 6 | ||||
| -rw-r--r-- | calendar/backends/weather/e-cal-backend-weather.c | 4 | ||||
| -rw-r--r-- | camel/providers/groupwise/ChangeLog | 7 | ||||
| -rw-r--r-- | camel/providers/groupwise/camel-groupwise-folder.c | 11 | ||||
| -rw-r--r-- | camel/providers/groupwise/camel-groupwise-utils.c | 2 | ||||
| -rw-r--r-- | camel/providers/imap/ChangeLog | 6 | ||||
| -rw-r--r-- | camel/providers/imap/camel-imap-utils.c | 3 | ||||
| -rw-r--r-- | camel/providers/pop3/ChangeLog | 6 | ||||
| -rw-r--r-- | camel/providers/pop3/camel-pop3-folder.c | 3 | ||||
| -rw-r--r-- | libedataserverui/ChangeLog | 6 | ||||
| -rw-r--r-- | libedataserverui/e-name-selector-entry.c | 2 | ||||
| -rw-r--r-- | servers/exchange/ChangeLog | 6 | ||||
| -rw-r--r-- | servers/exchange/storage/e-folder-exchange.c | 4 | ||||
| -rw-r--r-- | servers/groupwise/ChangeLog | 6 | ||||
| -rw-r--r-- | servers/groupwise/e-gw-connection.c | 3 |
19 files changed, 98 insertions, 33 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 1cb14387b..bc4b91218 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2007-03-26 Matthew Barnes <mbarnes@redhat.com> + + * backends/groupwise/e-book-backend-groupwise.c: + * libedata-book/e-book-backend-cache.c: + Don't mix declarations and code (#405495). + Patch from Jens Granseuer. + 2007-03-25 Ross Burton <ross@openedhand.com> * backends/file/e-book-backend-file.c: diff --git a/addressbook/backends/groupwise/e-book-backend-groupwise.c b/addressbook/backends/groupwise/e-book-backend-groupwise.c index 4bb1f3154..3ea0bb509 100644 --- a/addressbook/backends/groupwise/e-book-backend-groupwise.c +++ b/addressbook/backends/groupwise/e-book-backend-groupwise.c @@ -877,13 +877,14 @@ set_members_in_gw_item (EGwItem *item, EContact *contact, EBookBackendGroupwise temp = emails_without_ids ; for (; temp != NULL; temp = g_list_next (temp)) { EContact *new_contact = e_contact_new (); + EGwItem *new_item = e_gw_item_new_empty (); + FullName *full_name; + e_contact_set (new_contact,E_CONTACT_FULL_NAME, e_contact_name_from_string (strdup (temp->data))); e_contact_set (new_contact, E_CONTACT_EMAIL_1, strdup (temp->data)); e_contact_set (new_contact, E_CONTACT_IS_LIST, FALSE); - EGwItem *new_item = e_gw_item_new_empty (); e_gw_item_set_item_type (new_item, E_GW_ITEM_TYPE_CONTACT); e_gw_item_set_container_id (new_item, g_strdup(egwb->priv->container_id)); - FullName *full_name; full_name = g_new0 (FullName, 1); full_name->name_prefix = NULL; full_name->first_name = g_strdup(temp->data); @@ -2120,7 +2121,8 @@ get_contacts_from_cache (EBookBackendGroupwise *ebgw, if (enable_debug) printf ("\nread contacts from cache for the ids found in summary\n"); for (i = 0; i < ids->len; i ++) { - char *uid = g_ptr_array_index (ids, i); + char *uid; + EContact *contact; g_mutex_lock (closure->mutex); stopped = closure->stopped; @@ -2129,8 +2131,8 @@ get_contacts_from_cache (EBookBackendGroupwise *ebgw, if (stopped) break; - EContact *contact = - e_book_backend_db_cache_get_contact (ebgw->priv->file_db, uid); + uid = g_ptr_array_index (ids, i); + contact = e_book_backend_db_cache_get_contact (ebgw->priv->file_db, uid); if (contact) { e_data_book_view_notify_update (book_view, contact); g_object_unref (contact); @@ -2439,10 +2441,13 @@ static EDataBookView * find_book_view (EBookBackendGroupwise *ebgw) { EList *views = e_book_backend_get_book_views (E_BOOK_BACKEND (ebgw)); + EIterator *iter; + EDataBookView *rv = NULL; + if (!views) return NULL; - EIterator *iter = e_list_get_iterator (views); - EDataBookView *rv = NULL; + + iter = e_list_get_iterator (views); if (!iter) { g_object_unref (views); @@ -2900,11 +2905,19 @@ update_address_book_deltas (EBookBackendGroupwise *ebgw) EDataBookView *book_view; GroupwiseBackendSearchClosure *closure; EGwItem *item; + EBookBackendGroupwisePrivate *priv; + + GTimeVal start, end; + unsigned long diff; + const char *cache_file_name; + struct stat buf; + time_t mod_time; + if (!ebgw) return FALSE; - EBookBackendGroupwisePrivate *priv = ebgw->priv; + priv = ebgw->priv; g_mutex_lock (priv->update_mutex); @@ -2954,12 +2967,6 @@ update_address_book_deltas (EBookBackendGroupwise *ebgw) return TRUE; } - GTimeVal start, end; - unsigned long diff; - const char *cache_file_name; - struct stat buf; - time_t mod_time; - if (enable_debug) g_get_current_time(&start); @@ -3270,9 +3277,9 @@ e_book_backend_groupwise_authenticate_user (EBookBackend *backend, g_thread_create ((GThreadFunc) update_cache, ebgw, FALSE, NULL); } else if (priv->marked_for_offline) { + GThread *t; if (enable_debug) printf("marked for offline\n"); - GThread *t; if (enable_debug) printf("creating update_address_book_deltas thread\n"); @@ -3306,9 +3313,9 @@ e_book_backend_groupwise_authenticate_user (EBookBackend *backend, g_thread_create ((GThreadFunc) build_cache, ebgw, FALSE, NULL); } else if(priv->marked_for_offline) { + GThread *t; if (enable_debug) printf("else if marked_for_offline\n"); - GThread *t; /* System address book */ /* cache is not populated and book is not writable and marked for offline usage */ if (enable_debug) diff --git a/addressbook/libedata-book/e-book-backend-cache.c b/addressbook/libedata-book/e-book-backend-cache.c index f58c12369..05eeefe3d 100644 --- a/addressbook/libedata-book/e-book-backend-cache.c +++ b/addressbook/libedata-book/e-book-backend-cache.c @@ -510,7 +510,6 @@ char * e_book_backend_cache_get_time (EBookBackendCache *cache) { g_return_val_if_fail (E_IS_BOOK_BACKEND_CACHE (cache), 0); - const char *t = e_file_cache_get_object (E_FILE_CACHE (cache), "last_update_time"); - return t; + return e_file_cache_get_object (E_FILE_CACHE (cache), "last_update_time"); } diff --git a/calendar/ChangeLog b/calendar/ChangeLog index f9809baae..67d36316f 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2007-03-26 Matthew Barnes <mbarnes@redhat.com> + + * backends/groupwise/e-cal-backend-groupwise.c: + * backends/weather/e-cal-backend-weather.c: + Don't mix declarations and code (#405495). + Patch from Jens Granseuer. + 2007-03-25 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #420933 diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise.c b/calendar/backends/groupwise/e-cal-backend-groupwise.c index 73796e540..be727f0dd 100644 --- a/calendar/backends/groupwise/e-cal-backend-groupwise.c +++ b/calendar/backends/groupwise/e-cal-backend-groupwise.c @@ -406,12 +406,12 @@ get_deltas (gpointer handle) for (; item_list != NULL; item_list = g_list_next(item_list)) { EGwItem *item = NULL; - item = E_GW_ITEM(item_list->data); ECalComponent *modified_comp = NULL, *cache_comp = NULL; char *cache_comp_str = NULL; const char *uid, *rid = NULL; int r_key; + item = E_GW_ITEM(item_list->data); modified_comp = e_gw_item_to_cal_component (item, cbgw); if (!modified_comp) { g_message ("Invalid component returned in update"); @@ -2585,9 +2585,11 @@ send_object (ECalBackendGroupwise *cbgw, EDataCal *cal, icalcomponent *icalcomp, g_slist_free (comp_list); g_free (old_object); } else { + char * object; + id = e_cal_component_get_id (comp); icalcomp = e_cal_component_get_icalcomponent (comp); - char * object = e_cal_component_get_as_string (comp); + object = e_cal_component_get_as_string (comp); if (e_cal_backend_cache_remove_component (priv->cache, id->uid, id->rid)) { diff --git a/calendar/backends/weather/e-cal-backend-weather.c b/calendar/backends/weather/e-cal-backend-weather.c index 8a8a23020..2977bde6a 100644 --- a/calendar/backends/weather/e-cal-backend-weather.c +++ b/calendar/backends/weather/e-cal-backend-weather.c @@ -146,8 +146,10 @@ finished_retrieval_cb (GList *forecasts, ECalBackendWeather *cbw) /* update cache */ l = e_cal_backend_cache_get_components (priv->cache); for (; l != NULL; l = g_list_next (l)) { + ECalComponentId *id; + icomp = e_cal_component_get_icalcomponent (E_CAL_COMPONENT (l->data)); - ECalComponentId *id = e_cal_component_get_id (E_CAL_COMPONENT (l->data)); + id = e_cal_component_get_id (E_CAL_COMPONENT (l->data)); e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbw), id, diff --git a/camel/providers/groupwise/ChangeLog b/camel/providers/groupwise/ChangeLog index 3ba0a60a3..5ad7c6b60 100644 --- a/camel/providers/groupwise/ChangeLog +++ b/camel/providers/groupwise/ChangeLog @@ -1,3 +1,10 @@ +2007-03-26 Matthew Barnes <mbarnes@redhat.com> + + * camel-groupwise-folder.c: + * camel-groupwise-utils.c: + Don't mix declarations and code (#405495). + Patch from Jens Granseuer. + 2007-03-16 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #360240 diff --git a/camel/providers/groupwise/camel-groupwise-folder.c b/camel/providers/groupwise/camel-groupwise-folder.c index 0aab32ca3..9dee7b210 100644 --- a/camel/providers/groupwise/camel-groupwise-folder.c +++ b/camel/providers/groupwise/camel-groupwise-folder.c @@ -661,9 +661,11 @@ groupwise_sync (CamelFolder *folder, gboolean expunge, CamelException *ex) camel_message_info_free(info); continue; } else { + const char *uid; + gw_info->info.flags &= ~CAMEL_MESSAGE_FOLDER_FLAGGED; gw_info->server_flags = gw_info->info.flags; - const char *uid = camel_message_info_uid (info); + uid = camel_message_info_uid (info); if (diff.bits & CAMEL_MESSAGE_DELETED) { /* In case a new message is READ and then deleted immediately */ @@ -948,9 +950,8 @@ static CamelSessionThreadOps update_ops = { static void groupwise_refresh_info(CamelFolder *folder, CamelException *ex) { - CamelGroupwiseSummary *summary; + CamelGroupwiseSummary *summary = (CamelGroupwiseSummary *) folder->summary; CamelStoreInfo *si; - summary = (CamelGroupwiseSummary *) folder->summary; CamelGroupwiseStore *gw_store = CAMEL_GROUPWISE_STORE (folder->parent_store); /* * Checking for the summary->time_string here since the first the a @@ -1210,7 +1211,6 @@ gw_update_cache (CamelFolder *folder, GList *list, CamelException *ex, gboolean char *temp_date = NULL; const char *id; GSList *recp_list = NULL; - status_flags = 0; CamelStream *cache_stream, *t_cache_stream; CamelMimeMessage *mail_msg = NULL; gboolean is_sent_folder = FALSE; @@ -1218,6 +1218,7 @@ gw_update_cache (CamelFolder *folder, GList *list, CamelException *ex, gboolean int rk; exists = FALSE; + status_flags = 0; if (uid_flag == FALSE) { temp_item = (EGwItem *)item_list->data; @@ -1447,10 +1448,10 @@ gw_update_summary ( CamelFolder *folder, GList *list,CamelException *ex) char *temp_date = NULL; const char *id; GSList *recp_list = NULL; - status_flags = 0; const char *recurrence_key = NULL; int rk; + status_flags = 0; id = e_gw_item_get_id (item); mi = (CamelGroupwiseMessageInfo *)camel_folder_summary_uid (folder->summary, id); diff --git a/camel/providers/groupwise/camel-groupwise-utils.c b/camel/providers/groupwise/camel-groupwise-utils.c index 1f34b86d9..6fe90eb80 100644 --- a/camel/providers/groupwise/camel-groupwise-utils.c +++ b/camel/providers/groupwise/camel-groupwise-utils.c @@ -637,9 +637,9 @@ do_multipart (EGwConnection *cnc, EGwItem *item, CamelMultipart *mp, GSList **at CamelMimePart *temp_part; const char *cid = NULL; CamelStreamMem *temp_content = (CamelStreamMem *)camel_stream_mem_new (); - temp_part = camel_multipart_get_part ((CamelMultipart *)dw, 1); CamelDataWrapper *temp_dw = NULL; + temp_part = camel_multipart_get_part ((CamelMultipart *)dw, 1); if (temp_part) { is_alternative = TRUE; temp_dw = camel_medium_get_content_object (CAMEL_MEDIUM (temp_part)); diff --git a/camel/providers/imap/ChangeLog b/camel/providers/imap/ChangeLog index 5ec1ad16b..32e869db2 100644 --- a/camel/providers/imap/ChangeLog +++ b/camel/providers/imap/ChangeLog @@ -1,3 +1,9 @@ +2007-03-26 Matthew Barnes <mbarnes@redhat.com> + + * camel-imap-utils.c: + Don't mix declarations and code (#405495). + Patch from Jens Granseuer. + 2007-03-14 Sankar P <psankar@novell.com> * camel-imap-folder.c: (imap_update_summary): diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c index b952f0554..f520f2cb2 100644 --- a/camel/providers/imap/camel-imap-utils.c +++ b/camel/providers/imap/camel-imap-utils.c @@ -373,6 +373,7 @@ imap_parse_list_response (CamelImapStore *store, const char *buf, int *flags, ch if (folder) { char *astring; + char *mailbox; /* get the folder name */ word = imap_next_word (word); @@ -382,8 +383,6 @@ imap_parse_list_response (CamelImapStore *store, const char *buf, int *flags, ch *folder = astring; - char *mailbox; - mailbox = imap_mailbox_decode (astring, strlen (astring)); g_free (astring); if (!mailbox) diff --git a/camel/providers/pop3/ChangeLog b/camel/providers/pop3/ChangeLog index 9ba3875df..23cb83422 100644 --- a/camel/providers/pop3/ChangeLog +++ b/camel/providers/pop3/ChangeLog @@ -1,3 +1,9 @@ +2007-03-26 Matthew Barnes <mbarnes@redhat.com> + + * camel-pop3-folder.c: + Don't mix declarations and code (#405495). + Patch from Jens Granseuer. + 2007-02-10 Kjartan Maraas <kmaraas@gnome.org> * camel-pop3-folder.c: (pop3_sync), (camel_pop3_delete_old): diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c index 79f2706f0..69dbdf28b 100644 --- a/camel/providers/pop3/camel-pop3-folder.c +++ b/camel/providers/pop3/camel-pop3-folder.c @@ -364,6 +364,7 @@ camel_pop3_delete_old(CamelFolder *folder, int days_to_delete, CamelException *e int i; CamelPOP3Store *pop3_store; time_t temp; + CamelMimeMessage *message; pop3_folder = CAMEL_POP3_FOLDER (folder); pop3_store = CAMEL_POP3_STORE (CAMEL_FOLDER(pop3_folder)->parent_store); @@ -372,7 +373,7 @@ camel_pop3_delete_old(CamelFolder *folder, int days_to_delete, CamelException *e for (i = 0; i < pop3_folder->uids->len; i++) { fi = pop3_folder->uids->pdata[i]; - CamelMimeMessage *message = pop3_get_message (folder, fi->uid, ex); + message = pop3_get_message (folder, fi->uid, ex); if(message) { time_t message_time = message->date + message->date_offset; double time_diff = difftime(temp,message_time); diff --git a/libedataserverui/ChangeLog b/libedataserverui/ChangeLog index ab9d29f62..d742f5184 100644 --- a/libedataserverui/ChangeLog +++ b/libedataserverui/ChangeLog @@ -1,3 +1,9 @@ +2007-03-26 Matthew Barnes <mbarnes@redhat.com> + + * e-name-selector-entry.c: + Don't mix declarations and code (#405495). + Patch from Jens Granseuer. + 2007-02-09 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #405531 diff --git a/libedataserverui/e-name-selector-entry.c b/libedataserverui/e-name-selector-entry.c index 826675de8..0a87ac8aa 100644 --- a/libedataserverui/e-name-selector-entry.c +++ b/libedataserverui/e-name-selector-entry.c @@ -2199,6 +2199,7 @@ e_name_selector_entry_init (ENameSelectorEntry *name_selector_entry) { GtkCellRenderer *renderer; ENameSelectorEntryPrivate *priv; + GConfClient *gconf; priv = E_NAME_SELECTOR_ENTRY_GET_PRIVATE (name_selector_entry); @@ -2210,7 +2211,6 @@ e_name_selector_entry_init (ENameSelectorEntry *name_selector_entry) } /* read minimum_query_length from gconf*/ - GConfClient *gconf; gconf = gconf_client_get_default(); if (COMPLETION_CUE_MIN_LEN == 0) { if ((COMPLETION_CUE_MIN_LEN = gconf_client_get_int (gconf, MINIMUM_QUERY_LENGTH, NULL))) diff --git a/servers/exchange/ChangeLog b/servers/exchange/ChangeLog index 39d927082..4a6987600 100644 --- a/servers/exchange/ChangeLog +++ b/servers/exchange/ChangeLog @@ -1,3 +1,9 @@ +2007-03-26 Matthew Barnes <mbarnes@redhat.com> + + * storage/e-folder-exchange.c: + Don't mix declarations and code (#405495). + Patch from Jens Granseuer. + 2007-03-16 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #360240 diff --git a/servers/exchange/storage/e-folder-exchange.c b/servers/exchange/storage/e-folder-exchange.c index 0179a8490..64e2b69fb 100644 --- a/servers/exchange/storage/e-folder-exchange.c +++ b/servers/exchange/storage/e-folder-exchange.c @@ -748,11 +748,13 @@ e_folder_exchange_subscribe (EFolder *folder, void e_folder_exchange_unsubscribe (EFolder *folder) { + E2kContext *ctx; + g_return_if_fail (E_IS_FOLDER_EXCHANGE (folder)); /* FIXME : This is a hack as of now. The free_folder in mail-stub gets called when we are in offline and the context is NULL then. */ - E2kContext *ctx = E_FOLDER_EXCHANGE_CONTEXT (folder); + ctx = E_FOLDER_EXCHANGE_CONTEXT (folder); if (ctx) { e2k_context_unsubscribe (E_FOLDER_EXCHANGE_CONTEXT (folder), E_FOLDER_EXCHANGE_URI (folder)); diff --git a/servers/groupwise/ChangeLog b/servers/groupwise/ChangeLog index 6eb331fc4..4b02e512c 100644 --- a/servers/groupwise/ChangeLog +++ b/servers/groupwise/ChangeLog @@ -1,3 +1,9 @@ +2007-03-26 Matthew Barnes <mbarnes@redhat.com> + + * e-gw-connection.c: + Don't mix declarations and code (#405495). + Patch from Jens Granseuer. + 2007-01-09 Harish Krishnaswamy <kharish@novell.com> * e-gw-item.c : Fixes #242270 <bugzilla.novell.com>. diff --git a/servers/groupwise/e-gw-connection.c b/servers/groupwise/e-gw-connection.c index 761c34bb1..f4170c623 100644 --- a/servers/groupwise/e-gw-connection.c +++ b/servers/groupwise/e-gw-connection.c @@ -1996,9 +1996,10 @@ e_gw_connection_get_categories (EGwConnection *cnc, GHashTable **categories_by_i EGwConnectionPrivate *priv; SoupSoapParameter *param, *subparam, *second_level_child; char *id, *name; - g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), E_GW_CONNECTION_STATUS_INVALID_OBJECT); static GStaticMutex connecting = G_STATIC_MUTEX_INIT; + g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), E_GW_CONNECTION_STATUS_INVALID_OBJECT); + priv = cnc->priv; g_static_mutex_lock (&connecting); |
