]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Removed obsolete clone mehtod from proposal_substructure
authorMartin Willi <martin@revosec.ch>
Wed, 24 Nov 2010 12:58:33 +0000 (13:58 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 5 Jan 2011 15:45:51 +0000 (16:45 +0100)
src/libcharon/encoding/payloads/proposal_substructure.c
src/libcharon/encoding/payloads/proposal_substructure.h

index b68f017ef2d4234d3c84536b2e048b1a38060ba7..bc0f4f581b7fb49d0c26c6e317ea418aeb6fe10a 100644 (file)
@@ -341,35 +341,6 @@ METHOD(proposal_substructure_t, get_proposal, proposal_t*,
        return proposal;
 }
 
-METHOD(proposal_substructure_t, clone_, proposal_substructure_t*,
-       private_proposal_substructure_t *this)
-{
-       private_proposal_substructure_t *clone;
-       enumerator_t *enumerator;
-       transform_substructure_t *current;
-
-       clone = (private_proposal_substructure_t*)proposal_substructure_create();
-       clone->next_payload = this->next_payload;
-       clone->proposal_number = this->proposal_number;
-       clone->protocol_id = this->protocol_id;
-       clone->spi_size = this->spi_size;
-       if (this->spi.ptr != NULL)
-       {
-               clone->spi.ptr = clalloc(this->spi.ptr, this->spi.len);
-               clone->spi.len = this->spi.len;
-       }
-       enumerator = this->transforms->create_enumerator(this->transforms);
-       while (enumerator->enumerate(enumerator, &current))
-       {
-               current = current->clone(current);
-               add_transform_substructure(clone, current);
-       }
-       enumerator->destroy(enumerator);
-       compute_length(clone);
-
-       return &clone->public;
-}
-
 METHOD2(payload_t, proposal_substructure_t, destroy, void,
        private_proposal_substructure_t *this)
 {
@@ -405,7 +376,6 @@ proposal_substructure_t *proposal_substructure_create()
                        .get_proposal = _get_proposal,
                        .set_spi = _set_spi,
                        .get_spi = _get_spi,
-                       .clone = _clone_,
                        .destroy = _destroy,
                },
                .next_payload = NO_PAYLOAD,
index 56e7184b63f101b67a89021fe39c43c46b272f65..2e8d41733679113fa7af5516cd4286b66deede88 100644 (file)
@@ -110,13 +110,6 @@ struct proposal_substructure_t {
         */
        proposal_t * (*get_proposal) (proposal_substructure_t *this);
 
-       /**
-        * Clones an proposal_substructure_t object.
-        *
-        * @return              cloned object
-        */
-       proposal_substructure_t* (*clone) (proposal_substructure_t *this);
-
        /**
         * Destroys an proposal_substructure_t object.
         */