- fixed bug when finding out if payload has to get encrypted
authorJan Hutter <jhutter@hsr.ch>
Wed, 30 Nov 2005 09:26:06 +0000 (09:26 -0000)
committerJan Hutter <jhutter@hsr.ch>
Wed, 30 Nov 2005 09:26:06 +0000 (09:26 -0000)
Source/charon/encoding/message.c

index 8046031..6b389ee 100644 (file)
@@ -894,11 +894,12 @@ static status_t encrypt_payloads (private_message_t *this,crypter_t *crypter, si
        status = this->get_message_rule(this, &message_rule);
        if (status != SUCCESS)
        {
+               this->logger->log(this->logger, ERROR | MORE, "No message rule for this message type");
                return status;
        }
-       
        if (!message_rule->encrypted_content)
        {
+               this->logger->log(this->logger, CONTROL | MORE, "Message doesn't have to be encrypted");
                /* message contains no content to encrypt */
                return SUCCESS;
        }
@@ -927,7 +928,6 @@ static status_t encrypt_payloads (private_message_t *this,crypter_t *crypter, si
                if ((status == SUCCESS) && (supported_payload_entry->encrypted))
                {
                        to_encrypt = TRUE;
-                       break;
                }
                
                if (to_encrypt)