updated Doxyfile
[strongswan.git] / src / charon / encoding / payloads / sa_payload.c
index 751e832..950e16d 100644 (file)
@@ -1,10 +1,3 @@
-/**
- * @file sa_payload.c
- * 
- * @brief Implementation of sa_payload_t.
- * 
- */
-
 /*
  * Copyright (C) 2005-2006 Martin Willi
  * Copyright (C) 2005 Jan Hutter
@@ -19,6 +12,8 @@
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  * for more details.
+ *
+ * $Id$
  */
 
 #include <stddef.h>
@@ -119,18 +114,11 @@ static status_t verify(private_sa_payload_t *this)
        while(iterator->iterate(iterator, (void**)&current_proposal))
        {
                current_number = current_proposal->get_proposal_number(current_proposal);
-               if (current_number > expected_number)
-               {
-                       if (first)
-                       {
-                               DBG1(SIG_DBG_ENC, "first proposal is not proposal #1");
-                               status = FAILED;
-                               break;
-                       }
-                       
+               if (current_number < expected_number)
+               {                       
                        if (current_number != (expected_number + 1))
                        {
-                               DBG1(SIG_DBG_ENC, "proposal number is %d, excepted %d or %d",
+                               DBG1(DBG_ENC, "proposal number is %d, expected %d or %d",
                                         current_number, expected_number, expected_number + 1);
                                status = FAILED;
                                break;
@@ -139,7 +127,7 @@ static status_t verify(private_sa_payload_t *this)
                else if (current_number < expected_number)
                {
                        /* must not be smaller then proceeding one */
-                       DBG1(SIG_DBG_ENC, "proposal number smaller than that of previous proposal");
+                       DBG1(DBG_ENC, "proposal number smaller than that of previous proposal");
                        status = FAILED;
                        break;
                }
@@ -147,7 +135,7 @@ static status_t verify(private_sa_payload_t *this)
                status = current_proposal->payload_interface.verify(&(current_proposal->payload_interface));
                if (status != SUCCESS)
                {
-                       DBG1(SIG_DBG_ENC, "PROPOSAL_SUBSTRUCTURE verification failed");
+                       DBG1(DBG_ENC, "PROPOSAL_SUBSTRUCTURE verification failed");
                        break;
                }
                first = FALSE;