]> p2p-next.cs.pub.ro Git - swifty.git/commitdiff
Implement the copy constructor for the Address structure.
authorAdrian Bondrescu <adi.bondrescu@gmail.com>
Thu, 31 May 2012 23:36:57 +0000 (02:36 +0300)
committerAdrian Bondrescu <adi.bondrescu@gmail.com>
Thu, 31 May 2012 23:36:57 +0000 (02:36 +0300)
src/libswift/swift.h

index d44b88268883a3a83fe93f9cfcecef7689416cd7..288238affc977527d597c5989f68c50a91f60e9d 100644 (file)
@@ -108,6 +108,11 @@ namespace swift {
        Address() {
            clear();
        }
+       Address(const Address &b) {
+           clear();
+               addr->dests[0].addr = b.addr->dests[0].addr;
+               addr->dests[0].port = b.addr->dests[0].port;
+       }
        Address(const char* ip, uint16_t port)  {
            clear();
            set_ipv4(ip);