+2007-08-13 [wwp] 2.10.0cvs119
+
+ * src/addr_compl.c
+ * src/addressbook.c
+ * src/addrindex.c
+ * src/compose.c
+ * src/filtering.c
+ * src/folderview.c
+ * src/inc.c
+ * src/matcher.c
+ * src/mh.c
+ * src/partial_download.c
+ * src/prefs_gtk.c
+ * src/procmsg.c
+ * src/stock_pixmap.c
+ * src/summaryview.c
+ * src/common/utils.c
+ * src/gtk/gtkaspell.c
+ * src/gtk/menu.c
+ Make sure we never pass NULL pointers for %s substitutions
+ (prevent from crashing in Windows).
+
2007-08-13 [wwp] 2.10.0cvs118
* src/msgcache.c
( cvs diff -u -r 1.1.2.25 -r 1.1.2.26 src/plugins/pgpcore/prefs_gpg.c; ) > 2.10.0cvs116.patchset
( cvs diff -u -r 1.36.2.107 -r 1.36.2.108 src/common/utils.c; ) > 2.10.0cvs117.patchset
( cvs diff -u -r 1.16.2.57 -r 1.16.2.58 src/msgcache.c; ) > 2.10.0cvs118.patchset
+( cvs diff -u -r 1.27.2.38 -r 1.27.2.39 src/addr_compl.c; cvs diff -u -r 1.60.2.93 -r 1.60.2.94 src/addressbook.c; cvs diff -u -r 1.28.2.28 -r 1.28.2.29 src/addrindex.c; cvs diff -u -r 1.382.2.400 -r 1.382.2.401 src/compose.c; cvs diff -u -r 1.60.2.36 -r 1.60.2.37 src/filtering.c; cvs diff -u -r 1.207.2.173 -r 1.207.2.174 src/folderview.c; cvs diff -u -r 1.149.2.78 -r 1.149.2.79 src/inc.c; cvs diff -u -r 1.75.2.45 -r 1.75.2.46 src/matcher.c; cvs diff -u -r 1.79.2.59 -r 1.79.2.60 src/mh.c; cvs diff -u -r 1.1.2.19 -r 1.1.2.20 src/partial_download.c; cvs diff -u -r 1.10.2.33 -r 1.10.2.34 src/prefs_gtk.c; cvs diff -u -r 1.150.2.101 -r 1.150.2.102 src/procmsg.c; cvs diff -u -r 1.25.2.45 -r 1.25.2.46 src/stock_pixmap.c; cvs diff -u -r 1.395.2.318 -r 1.395.2.319 src/summaryview.c; cvs diff -u -r 1.36.2.108 -r 1.36.2.109 src/common/utils.c; cvs diff -u -r 1.9.2.52 -r 1.9.2.53 src/gtk/gtkaspell.c; cvs diff -u -r 1.5.2.23 -r 1.5.2.24 src/gtk/menu.c; ) > 2.10.0cvs119.patchset
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=118
+EXTRA_VERSION=119
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
g_ref_count++;
debug_print("start_address_completion(%s) ref count %d\n",
- folderpath, g_ref_count);
+ folderpath?folderpath:"(null)", g_ref_count);
return g_list_length(g_completion_list);
}
} else {
*folderpath = g_strdup_printf("%s", book->fileName);
}
- debug_print( "addressbook_foldersel: %s\n", *folderpath);
+ debug_print( "addressbook_foldersel: %s\n", *folderpath?*folderpath:"(null)");
return (*folderpath != NULL);
}
return FALSE;
AddressBookFile *abf = book->rawDataSource;
- debug_print("addrindex_load_completion: book %p '%s'\n", book, abf->fileName);
+ debug_print("addrindex_load_completion: book %p '%s'\n", book, abf?abf->fileName:"(null)");
addrindex_load_completion_load_persons( callBackFunc, book );
gchar **argv;
gint ret;
- debug_print("execute_command_line(): executing: %s\n", cmdline);
+ debug_print("execute_command_line(): executing: %s\n", cmdline?cmdline:"(null)");
argv = strsplit_with_quote(cmdline, " ", 0);
path = folder_item_fetch_msg(draft, msgnum);
if (path == NULL) {
- debug_print("can't fetch %s:%d\n",draft->path, msgnum);
+ debug_print("can't fetch %s:%d\n", draft->path, msgnum);
goto unlock;
}
if (g_stat(path, &s) < 0) {
if (str)
return strlen(str);
else {
- debug_print("%s(%d) - invalid string %s\n", __FILE__, fline, expr);
+ debug_print("%s(%d) - invalid string %s\n", __FILE__, fline, expr?expr:"(null)");
return 0;
}
}
folder_find_item_from_identifier(action->destination);
if (!dest_folder) {
debug_print("*** folder not found '%s'\n",
- action->destination ?action->destination :"");
+ action->destination ?action->destination :"(null)");
return FALSE;
}
if (!dest_folder) {
debug_print("*** folder not found '%s'\n",
- action->destination ?action->destination :"");
+ action->destination ?action->destination :"(null)");
return FALSE;
}
val = tags_get_id_for_str(action->destination);
if (val == -1) {
debug_print("*** tag '%s' not found\n",
- action->destination ?action->destination :"");
+ action->destination ?action->destination :"(null)");
return FALSE;
}
}
/* Open Folder */
+ /* TODO: wwp: avoid displaying (null) in the status bar */
buf = g_strdup_printf(_("Opening Folder %s..."), item->path ?
item->path : "(null)");
debug_print("%s\n", buf);
dlist = get_aspell_dict_info_list(config);
delete_aspell_config(config);
- debug_print("Aspell: checking for dictionaries in %s\n", aspell_path);
+ debug_print("Aspell: checking for dictionaries in %s\n", aspell_path?aspell_path:"(null)");
dels = aspell_dict_info_list_elements(dlist);
while ( (entry = aspell_dict_info_enumeration_next(dels)) != 0)
{
g_return_if_fail(widget != NULL);
if (!GTK_IS_CHECK_MENU_ITEM(widget)) {
- debug_print("%s not check_menu_item\n", path);
+ debug_print("%s not check_menu_item\n", path?path:"(null)");
return;
}
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), is_active);
} else
inbox = folder_get_default_inbox();
- if (is_file_exist(account->local_mbox))
- mbox = g_strdup(account->local_mbox);
- else if (is_dir_exist(account->local_mbox))
- mbox = g_strconcat(account->local_mbox, G_DIR_SEPARATOR_S,
- g_get_user_name(), NULL);
- else {
- debug_print("%s: local mailbox not found.\n",
- account->local_mbox);
+ if (account->local_mbox) {
+ if (is_file_exist(account->local_mbox))
+ mbox = g_strdup(account->local_mbox);
+ else if (is_dir_exist(account->local_mbox))
+ mbox = g_strconcat(account->local_mbox, G_DIR_SEPARATOR_S,
+ g_get_user_name(), NULL);
+ else {
+ debug_print("%s: local mailbox not found.\n",
+ account->local_mbox);
+ return -1;
+ }
+ } else {
+ debug_print("local mailbox not set in account info.\n");
return -1;
- }
-
+ }
+
result = get_spool(inbox, mbox, account);
g_free(mbox);
g_return_val_if_fail(address_list != NULL, FALSE);
debug_print("match_with_addresses_in_addressbook(%d, %s)\n",
- g_slist_length(address_list), folderpath);
+ g_slist_length(address_list), folderpath?folderpath:"(null)");
if (folderpath == NULL ||
strcasecmp(folderpath, _("Any")) == 0 ||
if ((s.st_mtime > item->mtime) &&
(s.st_mtime - 3600 != item->mtime)) {
debug_print("MH scan required, folder updated: %s (%ld > %ld)\n",
- path,
+ path?path:"(null)",
(long int) s.st_mtime,
(long int) item->mtime);
g_free(path);
}
debug_print("MH scan not required: %s (%ld <= %ld)\n",
- path,
+ path?path:"(null)",
(long int) s.st_mtime,
(long int) item->mtime);
g_free(path);
g_return_if_fail(item != NULL);
- debug_print("mh_get_last_num(): Scanning %s ...\n", item->path);
+ debug_print("mh_get_last_num(): Scanning %s ...\n", item->path?item->path:"(null)");
path = folder_item_get_path(item);
g_return_if_fail(path != NULL);
}
closedir(dp);
- debug_print("Last number in dir %s = %d\n", item->path, max);
+ debug_print("Last number in dir %s = %d\n", item->path?item->path:"(null)", max);
item->last_num = max;
}
g_return_val_if_fail(item != NULL, -1);
- debug_print("mh_get_num_list(): Scanning %s ...\n", item->path);
+ debug_print("mh_get_num_list(): Scanning %s ...\n", item->path?item->path:"(null)");
*old_uids_valid = TRUE;
path = folder_item_get_path(item);
if (!is_dir_exist(path)) {
- debug_print("folder '%s' not found. removing...\n", path);
+ debug_print("folder '%s' not found. removing...\n", path?path:"(null)");
folder_item_remove(item);
}
g_free(path);
}
item->mtime = s.st_mtime;
- debug_print("MH: forced mtime of %s to %ld\n", item->name, item->mtime);
+ debug_print("MH: forced mtime of %s to %ld\n", item->name?item->name:"(null)", item->mtime);
g_free(path);
}
int num = 0;
FolderItem *item = NULL;
- debug_print("too big message updated,should remove %s\n", file);
+ debug_print("too big message updated, should remove %s\n", file?file:"(null)");
if (snum) {
snum++;
GHashTable *section_cache = NULL;
if (!fp) {
- debug_print("cache: %s: %s", rcfile, strerror(errno));
+ debug_print("cache: %s: %s", rcfile?rcfile:"(null)", strerror(errno));
return -1;
}
GHashTable *file_cache = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, prefs_destroy_file_cache);
- debug_print("new file '%s'\n", rcfile);
+ debug_print("new file '%s'\n", rcfile?rcfile:"(null)");
g_hash_table_insert(whole_cache, g_strdup(rcfile), file_cache);
return prefs_cache_sections(file_cache, rcfile);
sections_table = g_hash_table_lookup(whole_cache, rcfile);
if (sections_table == NULL) {
- g_warning("Can't find %s in the whole cache\n", rcfile);
+ g_warning("Can't find %s in the whole cache\n", rcfile?rcfile:"(null)");
return FALSE;
}
values_table = g_hash_table_lookup(sections_table, label);
if (values_table == NULL) {
- debug_print("no '%s' section in '%s' cache\n", label, rcfile);
+ debug_print("no '%s' section in '%s' cache\n", label?label:"(null)", rcfile?rcfile:"(null)");
return TRUE;
}
g_hash_table_foreach(values_table, prefs_parse_cache, param);
g_slist_free(orig);
for (cur = result; cur; cur = cur->next)
- debug_print("sort after %s\n", ((MsgInfo *)cur->data)->from);
+ debug_print("sort after %s\n", ((MsgInfo *)cur->data)->from);
debug_print("\n");
DIR *dp;
if ((dp = opendir(dirname)) == NULL) {
- debug_print("dir %s not found, skipping theme scan", dirname);
+ debug_print("dir %s not found, skipping theme scan", dirname?dirname:"(null)");
return;
}
g_free(buf);
debug_print("empty folder (%p %s %p %d)\n\n",
item,
- item?item->path:"NULL",
+ (item && item->path)?item->path:"(null)",
item?folder_item_parent(item):0x0,
item?item->no_select:FALSE);
summary_set_hide_read_msgs_menu(summaryview, FALSE);