char hash[8];
/*struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);*/
CamelFolderChangeInfo *vf_changes = NULL, *unmatched_changes = NULL;
-
+ gpointer oldval;
+
if (vf == folder_unmatched)
return;
}
if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
if (still) {
- if (g_hash_table_lookup_extended(unmatched_uids, uid, (void **)&oldkey, (void **)&n)) {
+ if (g_hash_table_lookup_extended(unmatched_uids, uid, (void **)&oldkey, &oldval)) {
+ n = GPOINTER_TO_INT (oldval);
if (n == 1) {
g_hash_table_remove(unmatched_uids, oldkey);
if (vee_folder_add_uid(folder_unmatched, source, oldkey+8, hash))
}
}
} else {
- if (g_hash_table_lookup_extended(unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, (void **)&n)) {
+ if (g_hash_table_lookup_extended(unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, &oldval)) {
g_hash_table_remove(unmatched_uids, oldkey);
g_free(oldkey);
}
folder_added_uid(char *uidin, void *value, struct _update_data *u)
{
CamelVeeMessageInfo *mi;
+ gpointer oldval;
char *oldkey;
int n;
camel_folder_change_info_add_uid(u->vf->changes, camel_message_info_uid(mi));
if (!CAMEL_IS_VEE_FOLDER(u->source)) {
- if (g_hash_table_lookup_extended(unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, (void **)&n)) {
+ if (g_hash_table_lookup_extended(unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, &oldval)) {
+ n = GPOINTER_TO_INT (oldval);
g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n+1));
} else {
g_hash_table_insert(unmatched_uids, g_strdup(camel_message_info_uid(mi)), GINT_TO_POINTER(1));
we just ref the real memory */
matchhash = g_hash_table_new(g_str_hash, g_str_equal);
for (i=0;i<match->len;i++)
- g_hash_table_insert(matchhash, match->pdata[i], (void *)1);
+ g_hash_table_insert(matchhash, match->pdata[i], GINT_TO_POINTER (1));
allhash = g_hash_table_new(g_str_hash, g_str_equal);
all = camel_folder_get_uids(f);
for (i=0;i<all->len;i++)
if (g_hash_table_lookup(matchhash, all->pdata[i]) == NULL)
- g_hash_table_insert(allhash, all->pdata[i], (void *)1);
+ g_hash_table_insert(allhash, all->pdata[i], GINT_TO_POINTER (1));
CAMEL_VEE_FOLDER_LOCK(folder_unmatched, summary_lock);
if (mi) {
if (mi->folder == source) {
char *uid = (char *)camel_message_info_uid(mi), *oldkey;
-
+ gpointer oldval;
+
if (g_hash_table_lookup(matchhash, uid+8) == NULL) {
if (last == -1) {
last = start = i;
}
camel_folder_change_info_remove_uid(vf->changes, camel_message_info_uid(mi));
if (!CAMEL_IS_VEE_FOLDER(source)
- && g_hash_table_lookup_extended(unmatched_uids, uid, (void **)&oldkey, (void **)&n)) {
+ && g_hash_table_lookup_extended(unmatched_uids, uid, (void **)&oldkey, &oldval)) {
+ n = GPOINTER_TO_INT (oldval);
if (n == 1) {
g_hash_table_remove(unmatched_uids, oldkey);
g_free(oldkey);
{
CamelVeeMessageInfo *vinfo;
const char *vuid;
+ gpointer oldval;
char *oldkey;
int n;
camel_folder_change_info_add_uid(vf->changes, vuid);
if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER(sub)) {
- if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, (void **)&n)) {
+ if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, &oldval)) {
+ n = GPOINTER_TO_INT (oldval);
g_hash_table_insert(unmatched_uids, oldkey, GINT_TO_POINTER(n+1));
} else {
- g_hash_table_insert(unmatched_uids, g_strdup(vuid), (void *)1);
+ g_hash_table_insert(unmatched_uids, g_strdup(vuid), GINT_TO_POINTER (1));
}
vinfo = (CamelVeeMessageInfo *)camel_folder_get_message_info((CamelFolder *)folder_unmatched, vuid);
if (vinfo) {
{
CamelFolder *folder = (CamelFolder *)vf;
char *vuid, *oldkey;
+ gpointer oldval;
int n;
CamelVeeMessageInfo *vinfo;
if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && !CAMEL_IS_VEE_FOLDER(sub)) {
if (keep) {
- if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, (void **)&n)) {
+ if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, &oldval)) {
+ n = GPOINTER_TO_INT (oldval);
if (n == 1) {
g_hash_table_remove(unmatched_uids, oldkey);
if (vee_folder_add_uid(folder_unmatched, sub, uid, hash))
camel_folder_change_info_add_uid(folder_unmatched->changes, oldkey);
}
} else {
- if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, (void **)&n)) {
+ if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, &oldval)) {
g_hash_table_remove(unmatched_uids, oldkey);
g_free(oldkey);
}