24 Feb
2012
24 Feb
'12
4:32 a.m.
Tks Timo...
Em 23 de fevereiro de 2012 21:34, Timo Sirainen <tss@iki.fi> escreveu:
On 23.2.2012, at 18.19, Alex Baule wrote:
ok, inside my expunged rewrite function i create the array like quota does, and append it to my array.
struct emexis_ids_x_uis append_uis; append_uis.ids = _mail->uid; append_uis.uis_file = bodyFile; .. But when i do a foreach in this Array, my ids is OK, but my uis_file has tha same value every time (the value is the lasted value inserted).
I guess the memory isn't permanently allocated for it, so you need to do:
append_uis.uis_file = i_strdup(bodyFile);
Note that you'll also need to later i_free() it to avoid leaking memory.