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 d44b882..288238a 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);