evolution/evolution-2.10.1-check-uri-before-strcmp.patch

358 lines
13 KiB
Diff
Raw Normal View History

--- evolution-2.10.1/plugins/exchange-operations/exchange-config-listener.c.check-uri-before-strcmp 2007-04-09 09:09:13.000000000 -0400
+++ evolution-2.10.1/plugins/exchange-operations/exchange-config-listener.c 2007-05-14 13:34:13.000000000 -0400
@@ -1250,26 +1250,30 @@
exchange_add_autocompletion_folders (GConfClient *gc_client, ExchangeAccount *account)
{
ESourceList *sl=NULL;
- ESourceGroup *group;
ESource *source;
- GSList *groups, *sources;
+ GSList *groups;
gboolean found_group=FALSE;
sl = e_source_list_new_for_gconf (gc_client, CONF_KEY_CONTACTS);
groups = e_source_list_peek_groups (sl);
for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) {
- group = E_SOURCE_GROUP (groups->data);
+ ESourceGroup *group = E_SOURCE_GROUP (groups->data);
+
if (strcmp (e_source_group_peek_name (group), account->account_name) == 0
&&
strcmp (e_source_group_peek_base_uri (group), EXCHANGE_URI_PREFIX) == 0) {
-
- sources = e_source_group_peek_sources (group);
+ GSList *sources = e_source_group_peek_sources (group);
for( ; sources != NULL; sources = g_slist_next (sources)) {
- source = E_SOURCE (sources->data);
- if (g_str_has_prefix (e_source_peek_absolute_uri (source),
- "gal://")) {
+ ESource *source = E_SOURCE (sources->data);
+ const gchar *absolute_uri;
+
+ g_assert (source != NULL);
+ absolute_uri = e_source_peek_absolute_uri (source);
+ if (absolute_uri == NULL)
+ continue;
+ if (g_str_has_prefix (absolute_uri, "gal://")) {
/* Set autocompletion on GAL alone by default */
e_source_set_property (source, "completion", "true");
break;
--- evolution-2.10.1/plugins/groupwise-account-setup/camel-gw-listener.c.check-uri-before-strcmp 2007-05-14 13:21:57.000000000 -0400
+++ evolution-2.10.1/plugins/groupwise-account-setup/camel-gw-listener.c 2007-05-14 13:34:13.000000000 -0400
@@ -254,10 +254,7 @@
remove_esource (const char *conf_key, const char *group_name, char* source_name, const char* relative_uri)
{
ESourceList *list;
- ESourceGroup *group;
- ESource *source;
GSList *groups;
- GSList *sources;
gboolean found_group;
GConfClient* client;
GSList *ids;
@@ -271,19 +268,21 @@
found_group = FALSE;
for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) {
-
- group = E_SOURCE_GROUP (groups->data);
+ ESourceGroup *group = E_SOURCE_GROUP (groups->data);
if (strcmp (e_source_group_peek_name (group), group_name) == 0 &&
strcmp (e_source_group_peek_base_uri (group), GROUPWISE_URI_PREFIX ) == 0) {
-
- sources = e_source_group_peek_sources (group);
+ GSList *sources = e_source_group_peek_sources (group);
for( ; sources != NULL; sources = g_slist_next (sources)) {
-
- source = E_SOURCE (sources->data);
-
- if (strcmp (e_source_peek_relative_uri (source), relative_uri) == 0) {
+ ESource *source = E_SOURCE (sources->data);
+ const gchar *source_relative_uri;
+
+ g_assert (source != NULL);
+ source_relative_uri = e_source_peek_relative_uri (source);
+ if (source_relative_uri == NULL)
+ continue;
+ if (strcmp (source_relative_uri, relative_uri) == 0) {
if (!strcmp (conf_key, CALENDAR_SOURCES))
source_selection_key = SELECTED_CALENDARS;
@@ -328,16 +327,12 @@
modify_esource (const char* conf_key, GwAccountInfo *old_account_info, const char* new_group_name, CamelURL *new_url)
{
ESourceList *list;
- ESourceGroup *group;
- ESource *source;
GSList *groups;
- GSList *sources;
char *old_relative_uri;
CamelURL *url;
gboolean found_group;
GConfClient* client;
const char *poa_address;
- char *new_relative_uri;
const char *new_poa_address;
url = camel_url_new (old_account_info->source_url, NULL);
@@ -354,20 +349,23 @@
found_group = FALSE;
for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) {
-
- group = E_SOURCE_GROUP (groups->data);
+ ESourceGroup *group = E_SOURCE_GROUP (groups->data);
if (strcmp (e_source_group_peek_name (group), old_account_info->name) == 0 &&
strcmp (e_source_group_peek_base_uri (group), GROUPWISE_URI_PREFIX) == 0) {
-
- sources = e_source_group_peek_sources (group);
+ GSList *sources = e_source_group_peek_sources (group);
for ( ; sources != NULL; sources = g_slist_next (sources)) {
-
- source = E_SOURCE (sources->data);
-
- if (strcmp (e_source_peek_relative_uri (source), old_relative_uri) == 0) {
-
+ ESource *source = E_SOURCE (sources->data);
+ const gchar *source_relative_uri;
+
+ g_assert (source != NULL);
+ source_relative_uri = e_source_peek_relative_uri (source);
+ if (source_relative_uri == NULL)
+ continue;
+ if (strcmp (source_relative_uri, old_relative_uri) == 0) {
+ gchar *new_relative_uri;
+
new_relative_uri = g_strdup_printf ("%s@%s/", new_url->user, new_poa_address);
e_source_group_set_name (group, new_group_name);
e_source_set_relative_uri (source, new_relative_uri);
--- evolution-2.10.1/plugins/hula-account-setup/camel-hula-listener.c.check-uri-before-strcmp 2007-04-09 09:09:14.000000000 -0400
+++ evolution-2.10.1/plugins/hula-account-setup/camel-hula-listener.c 2007-05-14 13:34:13.000000000 -0400
@@ -241,10 +241,7 @@
remove_esource (const char *conf_key, const char *group_name, char* source_name, const char* relative_uri)
{
ESourceList *list;
- ESourceGroup *group;
- ESource *source;
GSList *groups;
- GSList *sources;
gboolean found_group;
GConfClient* client;
GSList *ids;
@@ -258,19 +255,21 @@
found_group = FALSE;
for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) {
-
- group = E_SOURCE_GROUP (groups->data);
+ ESourceGroup *group = E_SOURCE_GROUP (groups->data);
if (strcmp (e_source_group_peek_name (group), group_name) == 0 &&
strcmp (e_source_group_peek_base_uri (group), HULA_CALDAV_URI_PREFIX ) == 0) {
-
- sources = e_source_group_peek_sources (group);
+ GSList *sources = e_source_group_peek_sources (group);
for( ; sources != NULL; sources = g_slist_next (sources)) {
-
- source = E_SOURCE (sources->data);
-
- if (strcmp (e_source_peek_relative_uri (source), relative_uri) == 0) {
+ ESource *source = E_SOURCE (sources->data);
+ const gchar *source_relative_uri;
+
+ g_assert (source != NULL);
+ source_relative_uri = e_source_peek_relative_uri (source);
+ if (source_relative_uri == NULL)
+ continue;
+ if (strcmp (source_relative_uri, relative_uri) == 0) {
if (!strcmp (conf_key, CALENDAR_SOURCES))
source_selection_key = SELECTED_CALENDARS;
@@ -311,15 +310,11 @@
modify_esource (const char* conf_key, HulaAccountInfo *old_account_info, const char* new_group_name, CamelURL *new_url)
{
ESourceList *list;
- ESourceGroup *group;
- ESource *source;
GSList *groups;
- GSList *sources;
char *old_relative_uri;
CamelURL *url;
gboolean found_group;
GConfClient* client;
- char *new_relative_uri;
url = camel_url_new (old_account_info->source_url, NULL);
if (!url->host || strlen (url->host) ==0)
@@ -334,19 +329,23 @@
for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) {
- group = E_SOURCE_GROUP (groups->data);
+ ESourceGroup *group = E_SOURCE_GROUP (groups->data);
if (strcmp (e_source_group_peek_name (group), old_account_info->name) == 0 &&
strcmp (e_source_group_peek_base_uri (group), HULA_CALDAV_URI_PREFIX) == 0) {
-
- sources = e_source_group_peek_sources (group);
+ GSList *sources = e_source_group_peek_sources (group);
for ( ; sources != NULL; sources = g_slist_next (sources)) {
-
- source = E_SOURCE (sources->data);
-
- if (strcmp (e_source_peek_relative_uri (source), old_relative_uri) == 0) {
-
+ ESource *source = E_SOURCE (sources->data);
+ const gchar *source_relative_uri;
+
+ g_assert (source != NULL);
+ source_relative_uri = e_source_peek_relative_uri (source);
+ if (source_relative_uri == NULL)
+ continue;
+ if (strcmp (source_relative_uri, old_relative_uri) == 0) {
+ gchar *new_relative_uri;
+
new_relative_uri = g_strdup_printf ("%s@%s:%d/dav/%s/calendar/Personal", new_url->user, new_url->host, new_url->port, new_url->user);
e_source_group_set_name (group, new_group_name);
e_source_set_relative_uri (source, new_relative_uri);
--- evolution-2.10.1/addressbook/gui/component/addressbook-component.c.check-uri-before-strcmp 2007-04-09 09:07:42.000000000 -0400
+++ evolution-2.10.1/addressbook/gui/component/addressbook-component.c 2007-05-14 13:34:13.000000000 -0400
@@ -118,7 +118,13 @@
GSList *s;
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- if (!strcmp (PERSONAL_RELATIVE_URI, e_source_peek_relative_uri (source))) {
+ const gchar *relative_uri;
+
+ g_assert (source != NULL);
+ relative_uri = e_source_peek_relative_uri (source);
+ if (relative_uri == NULL)
+ continue;
+ if (!strcmp (PERSONAL_RELATIVE_URI, relative_uri)) {
personal_source = source;
break;
}
--- evolution-2.10.1/addressbook/gui/component/addressbook-migrate.c.check-uri-before-strcmp 2007-05-14 13:21:57.000000000 -0400
+++ evolution-2.10.1/addressbook/gui/component/addressbook-migrate.c 2007-05-14 13:34:13.000000000 -0400
@@ -472,7 +472,13 @@
GSList *s;
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- if (!strcmp (PERSONAL_RELATIVE_URI, e_source_peek_relative_uri (source))) {
+ const gchar *relative_uri;
+
+ g_assert (source != NULL);
+ relative_uri = e_source_peek_relative_uri (source);
+ if (relative_uri == NULL)
+ continue;
+ if (!strcmp (PERSONAL_RELATIVE_URI, relative_uri)) {
*personal_source = g_object_ref (source);
break;
}
--- evolution-2.10.1/calendar/gui/calendar-component.c.check-uri-before-strcmp 2007-05-14 13:21:57.000000000 -0400
+++ evolution-2.10.1/calendar/gui/calendar-component.c 2007-05-14 13:34:13.000000000 -0400
@@ -210,7 +210,13 @@
GSList *s;
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- if (!strcmp (PERSONAL_RELATIVE_URI, e_source_peek_relative_uri (source))) {
+ const gchar *relative_uri;
+
+ g_assert (source != NULL);
+ relative_uri = e_source_peek_relative_uri (source);
+ if (relative_uri == NULL)
+ continue;
+ if (!strcmp (PERSONAL_RELATIVE_URI, relative_uri)) {
personal_source = source;
break;
}
--- evolution-2.10.1/calendar/gui/tasks-component.c.check-uri-before-strcmp 2007-05-14 13:21:57.000000000 -0400
+++ evolution-2.10.1/calendar/gui/tasks-component.c 2007-05-14 13:34:13.000000000 -0400
@@ -170,7 +170,13 @@
GSList *s;
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- if (!strcmp (PERSONAL_RELATIVE_URI, e_source_peek_relative_uri (source))) {
+ const gchar *relative_uri;
+
+ g_assert (source != NULL);
+ relative_uri = e_source_peek_relative_uri (source);
+ if (relative_uri == NULL)
+ continue;
+ if (!strcmp (PERSONAL_RELATIVE_URI, relative_uri)) {
personal_source = source;
break;
}
--- evolution-2.10.1/calendar/gui/memos-component.c.check-uri-before-strcmp 2007-05-14 13:21:57.000000000 -0400
+++ evolution-2.10.1/calendar/gui/memos-component.c 2007-05-14 13:34:13.000000000 -0400
@@ -174,7 +174,13 @@
GSList *s;
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- if (!strcmp (PERSONAL_RELATIVE_URI, e_source_peek_relative_uri (source))) {
+ const gchar *relative_uri;
+
+ g_assert (source != NULL);
+ relative_uri = e_source_peek_relative_uri (source);
+ if (relative_uri == NULL)
+ continue;
+ if (!strcmp (PERSONAL_RELATIVE_URI, relative_uri)) {
personal_source = source;
break;
}
--- evolution-2.10.1/calendar/gui/migration.c.check-uri-before-strcmp 2007-05-14 13:21:57.000000000 -0400
+++ evolution-2.10.1/calendar/gui/migration.c 2007-05-14 13:34:13.000000000 -0400
@@ -466,7 +466,13 @@
GSList *s;
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- if (!strcmp (PERSONAL_RELATIVE_URI, e_source_peek_relative_uri (source))) {
+ const gchar *relative_uri;
+
+ g_assert (source != NULL);
+ relative_uri = e_source_peek_relative_uri (source);
+ if (relative_uri == NULL)
+ continue;
+ if (!strcmp (PERSONAL_RELATIVE_URI, relative_uri)) {
*personal_source = g_object_ref (source);
break;
}
@@ -562,7 +568,13 @@
GSList *s;
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- if (!strcmp (PERSONAL_RELATIVE_URI, e_source_peek_relative_uri (source))) {
+ const gchar *relative_uri;
+
+ g_assert (source != NULL);
+ relative_uri = e_source_peek_relative_uri (source);
+ if (relative_uri == NULL)
+ continue;
+ if (!strcmp (PERSONAL_RELATIVE_URI, relative_uri)) {
*personal_source = g_object_ref (source);
break;
}
@@ -1070,7 +1082,13 @@
GSList *s;
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- if (!strcmp (PERSONAL_RELATIVE_URI, e_source_peek_relative_uri (source))) {
+ const gchar *relative_uri;
+
+ g_assert (source != NULL);
+ relative_uri = e_source_peek_relative_uri (source);
+ if (relative_uri == NULL)
+ continue;
+ if (!strcmp (PERSONAL_RELATIVE_URI, relative_uri)) {
*personal_source = g_object_ref (source);
break;
}