old_len = migr_chardata_len;
new_len = old_len + len;
+
new_buffer = realloc(migr_chardata, new_len + 1);
if (new_buffer != NULL) {
memcpy(&new_buffer[old_len], s, len);
cdb_store(CDB_MSGMAIN, &import_msgnum, sizeof(long), decoded_msg, msglen);
free(decoded_msg);
decoded_msg = NULL;
+ smi.meta_msgnum = import_msgnum;
PutMetaData(&smi);
syslog(LOG_INFO, "Imported message #%ld, size=%ld, refcount=%d, content-type: %s\n",
import_msgnum, msglen, smi.meta_refcount, smi.meta_content_type);