logDebug ("signAttachment: commit changes.\r\n");
logDebug ("signAttachment: commit changes.\n");
MapiGPGMEImpl::signAttachment (const char *datfile){    char *sigfile;    LPATTACH newatt;    int pos=0, err=0;    sigfile = (char *)xcalloc (1,strlen (datfile)+5);    strcpy (sigfile, datfile);    strcat (sigfile, ".asc");    newatt = createAttachment (pos);    setAttachMethod (newatt, ATTACH_BY_VALUE);    setAttachFilename (newatt, sigfile, false);    if (nstorePasswd == 0)	err = op_sign_file (OP_SIG_DETACH, datfile, sigfile);    else if (passCache->size () == 0) {	cache_item_t itm=NULL;	err = op_sign_file_ext (OP_SIG_DETACH, datfile, sigfile, &itm);	if (!err)	    storePassphrase (itm);    }    else	err = op_sign_file_next (passphraseCallback, this, OP_SIG_DETACH, datfile, sigfile);    if (streamFromFile (sigfile, newatt)) {	logDebug ("signAttachment: commit changes.\r\n");	newatt->SaveChanges (FORCE_SAVE);    }    releaseAttachment (newatt);    xfree (sigfile);    return (!err)? true : false;}