logDebug ("attachPublicKey: commit changes.\r\n");
logDebug ("attachPublicKey: commit changes.\n");
MapiGPGMEImpl::attachPublicKey (const char *keyid){    /* @untested@ */    const char *patt[1];    char *keyfile;    int err, pos = 0;    LPATTACH newatt;    keyfile = generateTempname (keyid);    patt[0] = xstrdup (keyid);    err = op_export_keys (patt, keyfile);    newatt = createAttachment (pos);    setAttachMethod (newatt, ATTACH_BY_VALUE);    setAttachFilename (newatt, keyfile, false);    /* XXX: set proper RFC3156 MIME types. */    if (streamFromFile (keyfile, newatt)) {	logDebug ("attachPublicKey: commit changes.\r\n");	newatt->SaveChanges (FORCE_SAVE);    }    releaseAttachment (newatt);    xfree (keyfile);    xfree ((void *)patt[0]);    return err;}