renamed all static clone() functions to avoid naming conflicts with uclibc
authorMartin Willi <martin@strongswan.org>
Thu, 1 Feb 2007 15:24:10 +0000 (15:24 -0000)
committerMartin Willi <martin@strongswan.org>
Thu, 1 Feb 2007 15:24:10 +0000 (15:24 -0000)
src/charon/debug
src/charon/network/packet.c
src/charon/sa/ike_sa_id.c
src/libstrongswan/utils/host.c
src/libstrongswan/utils/identification.c

index 0a246ba..5aef922 100755 (executable)
@@ -1,6 +1,12 @@
 #!/bin/bash
-make install || exit
-ipsec start --nofork &
+CMD=`tempfile`
+LOG="debug.log"
+ipsec start --nofork 2>&1 > $LOG &
 sleep 1
-gdb /usr/local/libexec/ipsec/charon `cat /var/run/charon.pid`
+echo >> $LOG
+echo >> $LOG
+echo >> $LOG
+echo "c" > $CMD
+gdb -batch /usr/local/libexec/ipsec/charon `cat /var/run/charon.pid ` -x $CMD 2>&1 >> $LOG
 ipsec stop
+rm $CMD
index 6948fb4..ca8b2a6 100644 (file)
@@ -130,7 +130,7 @@ static void destroy(private_packet_t *this)
 /**
  * Implements packet_t.clone.
  */
-static packet_t *clone(private_packet_t *this)
+static packet_t *clone_(private_packet_t *this)
 {
        private_packet_t *other = (private_packet_t*)packet_create();
        
@@ -163,7 +163,7 @@ packet_t *packet_create(void)
        this->public.get_source = (host_t*(*) (packet_t *)) get_source;
        this->public.set_destination = (void(*) (packet_t *,host_t*)) set_destination;
        this->public.get_destination = (host_t*(*) (packet_t *)) get_destination;
-       this->public.clone = (packet_t*(*) (packet_t *))clone;
+       this->public.clone = (packet_t*(*) (packet_t *))clone_;
        this->public.destroy = (void(*) (packet_t *)) destroy;
        
        this->destination = NULL;
index 627e727..c143fc0 100644 (file)
@@ -147,7 +147,7 @@ static bool switch_initiator(private_ike_sa_id_t *this)
 /**
  * Implementation of ike_sa_id_t.clone.
  */
-static ike_sa_id_t* clone(private_ike_sa_id_t *this)
+static ike_sa_id_t* clone_(private_ike_sa_id_t *this)
 {
        return ike_sa_id_create(this->initiator_spi, this->responder_spi, this->is_initiator_flag);
 }
@@ -203,7 +203,7 @@ ike_sa_id_t * ike_sa_id_create(u_int64_t initiator_spi, u_int64_t responder_spi,
        this->public.replace_values = (void(*)(ike_sa_id_t*,ike_sa_id_t*)) replace_values;
        this->public.is_initiator = (bool(*)(ike_sa_id_t*)) is_initiator;
        this->public.switch_initiator = (bool(*)(ike_sa_id_t*)) switch_initiator;
-       this->public.clone = (ike_sa_id_t*(*)(ike_sa_id_t*)) clone;
+       this->public.clone = (ike_sa_id_t*(*)(ike_sa_id_t*)) clone_;
        this->public.destroy = (void(*)(ike_sa_id_t*))destroy;
 
        /* private data */
index 29c3075..f9be454 100644 (file)
@@ -248,7 +248,7 @@ static void set_port(private_host_t *this, u_int16_t port)
 /**
  * Implements host_t.clone.
  */
-static private_host_t *clone(private_host_t *this)
+static private_host_t *clone_(private_host_t *this)
 {
        private_host_t *new = malloc_thing(private_host_t);
        
@@ -368,7 +368,7 @@ static private_host_t *host_create_empty(void)
        
        this->public.get_sockaddr = (sockaddr_t* (*) (host_t*))get_sockaddr;
        this->public.get_sockaddr_len = (socklen_t*(*) (host_t*))get_sockaddr_len;
-       this->public.clone = (host_t* (*) (host_t*))clone;
+       this->public.clone = (host_t* (*) (host_t*))clone_;
        this->public.get_family = (int (*) (host_t*))get_family;
        this->public.get_address = (chunk_t (*) (host_t *)) get_address;
        this->public.get_port = (u_int16_t (*) (host_t *))get_port;
index 90c1227..6c77b41 100644 (file)
@@ -921,7 +921,7 @@ static void __attribute__ ((constructor))print_register()
 /**
  * Implementation of identification_t.clone.
  */
-static identification_t *clone(private_identification_t *this)
+static identification_t *clone_(private_identification_t *this)
 {
        private_identification_t *clone = identification_create();
        
@@ -952,7 +952,7 @@ static private_identification_t *identification_create(void)
        this->public.get_encoding = (chunk_t (*) (identification_t*))get_encoding;
        this->public.get_type = (id_type_t (*) (identification_t*))get_type;
        this->public.contains_wildcards = (bool (*) (identification_t *this))contains_wildcards;
-       this->public.clone = (identification_t* (*) (identification_t*))clone;
+       this->public.clone = (identification_t* (*) (identification_t*))clone_;
        this->public.destroy = (void (*) (identification_t*))destroy;
        /* we use these as defaults, the may be overloaded for special ID types */
        this->public.equals = (bool (*) (identification_t*,identification_t*))equals_binary;