old_user = hash_table_lookup(users, POINTER_CAST(user_hash));
if (old_user != NULL)
user->next = old_user;
- hash_table_insert(users, POINTER_CAST(user_hash), user);
+ hash_table_update(users, POINTER_CAST(user_hash), user);
}
static void ATTR_NULL(1)
stats_line_set_prev_values(ctx, old_line, line);
array_append(&ctx->lines, &line, 1);
}
- hash_table_insert(ctx->sessions, line->id, line);
+ hash_table_update(ctx->sessions, line->id, line);
}
if (ctx->input->stream_errno != 0) {
break;
value = str_tabunescape(p_strdup(dict->hash_pool, value));
- hash_table_insert(dict->hash, key, value);
+ hash_table_update(dict->hash, key, value);
}
i_stream_destroy(&input);
}
d->user = p_strndup(file->pool,
data + hdr.id_size, hdr.user_size);
d->time = hdr.stamp;
- hash_table_insert(file->hash, d, d);
+ hash_table_update(file->hash, d, d);
} else {
change_count++;
}
d->time = timestamp;
ctx->file->changed = TRUE;
- hash_table_insert(ctx->file->hash, d, d);
+ hash_table_update(ctx->file->hash, d, d);
}
void duplicate_flush(struct duplicate_context *ctx)
}
action = MDBOX_MSG_ACTION_MOVE_FROM_ALT;
- hash_table_insert(ctx->altmoves, POINTER_CAST(cur_map_uid),
+ hash_table_update(ctx->altmoves, POINTER_CAST(cur_map_uid),
POINTER_CAST(action));
seq_range_array_add(&ctx->purge_file_ids, cur_rec.file_id);
}
we'll waste a bit of memory here by allocating the record
twice, but that's not really a problem. */
rec->filename = old_rec->filename;
- hash_table_insert(uidlist->files, rec->filename, rec);
+ hash_table_update(uidlist->files, rec->filename, rec);
uidlist->unsorted = TRUE;
return TRUE;
} else {
}
rec->filename = p_strdup(uidlist->record_pool, line);
- hash_table_insert(uidlist->files, rec->filename, rec);
+ hash_table_update(uidlist->files, rec->filename, rec);
array_append(&uidlist->records, &rec, 1);
return TRUE;
}
key = *args;
value = "";
}
- hash_table_insert(config->config, key, value);
+ hash_table_update(config->config, key, value);
}
return config;
i_assert(mail->seq <= client->highest_seq);
seq_uidls[mail->seq-1] = uidl;
if (uidl_duplicates_rename)
- hash_table_insert(prev_uidls, uidl, POINTER_CAST(1));
+ hash_table_update(prev_uidls, uidl, POINTER_CAST(1));
}
(void)mailbox_search_deinit(&search_ctx);
if (uidl_duplicates_rename)