NSIS-ka
A free C++ implementation of NSIS protocols

Changeset 4157


Ignore:
Timestamp:
Jul 23, 2009, 4:16:48 PM (8 years ago)
Author:
stud-lenk
Message:

Revert accidental full commit #4155

Location:
protlib/branches/20090723-multicast
Files:
3 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • protlib/branches/20090723-multicast/include/address.h

    r4156 r4157  
    215215typedef list<hostaddress> hostaddresslist_t;
    216216
    217 ostream &operator<<(ostream &out, const hostaddresslist_t &list);
    218 
    219217/// ========================================================
    220218/// IP Application Address
  • protlib/branches/20090723-multicast/src/Makefile

    r4156 r4157  
    105105TP_QUERY_ENCAP_OBJ= tp_queryencap.o
    106106
    107 PROTLIB_OBJS    = networkinterface.o address.o ie.o tp.o tp_over_tcp.o tp_over_tls_tcp.o \
     107PROTLIB_OBJS    = address.o ie.o tp.o tp_over_tcp.o tp_over_tls_tcp.o \
    108108                  cmsghdr_util.o tp_over_udp.o $(TP_QUERY_ENCAP_OBJ) tp_over_uds.o \
    109109                  $(TP_SCTPOBJ) connectionmap.o connectionmap_uds.o queuemanager.o fqueue.o \
  • protlib/branches/20090723-multicast/src/configpar.cpp

    r4156 r4157  
    266266}
    267267
     268
     269
    268270// write address list quoted to a config file
    269271template <>
     
    277279}
    278280
    279 // interface list
    280 template <>
    281 istream&
    282 configpar< list<networkinterface> >::readVal(std::istream &in) {
    283         std::string tmp;
    284         bool success= false;
    285         while ( in >> tmp ) {
    286                 networkinterface iface(tmp.c_str(), &success);
    287                 if ( success )
    288                         value.push_back(iface);
    289                 else
    290                         throw configParExceptionParseError("invalid interface `" + tmp + "'");
    291         }
    292         return in;
    293 }
    294 
    295 template <>
    296 istream&
    297 configpar< list<networkinterface> >::readValFromConfig(std::istream &in) {
    298         std::string tmp= parse_quoted_string(in);
    299         stringstream inputstr(tmp);
    300 
    301         bool success= false;
    302         while ( inputstr >> tmp ) {
    303                 networkinterface iface(tmp.c_str(), &success);
    304                 if ( success )
    305                         value.push_back(iface);
    306                 else
    307                         throw configParExceptionParseError("invalid interface `" + tmp + "'");
    308         }
    309         return in;
    310 }
    311 
    312 // write network interface list quoted to a config file
    313 template <>
    314 ostream&
    315 configpar< list<networkinterface> >::writeValToConfig(ostream& outstream) const
    316 {
    317         std::stringstream ifaceliststr;
    318         ifaceliststr << value;
    319         write_quoted_string(outstream, ifaceliststr.str());
    320         return outstream;
    321 }
    322 
    323281// write a string quoted (with escape chars) to a config file
    324282template <>
  • protlib/branches/20090723-multicast/test/Makefile

    r4156 r4157  
    2424CXXFLAGS = -Wall -ggdb -pedantic -Wno-long-long $(ALL_INCLUDES) \
    2525                `cppunit-config --cflags`
    26 LDFLAGS = $(ALL_LIBS) `cppunit-config --libs` -lpthread -lipq -lssl -lcrypto
     26LDFLAGS = $(ALL_LIBS) `cppunit-config --libs` -lpthread -lipq -lssl -lcrypto -lsctp
    2727
    2828TEST_DEPS = $(LIB_FASTQ) $(LIB_PROT)
  • protlib/branches/20090723-multicast/test/test_address.cpp

    r4156 r4157  
    256256                CPPUNIT_ASSERT( ta.is_multicast() );
    257257        }
     258        void test_multicast_hostaddress() {
     259                hostaddress ta; // testaddress
     260
     261                // Test IPv4 addresses
     262                ta.set_ipv4("127.0.0.1");
     263                CPPUNIT_ASSERT( !ta.is_multicast() );
     264
     265                ta.set_ipv4("224.0.0.0");
     266                CPPUNIT_ASSERT( ta.is_multicast() );
     267
     268                // Test IPv6 addresses
     269                ta.set_ip("2001:638:204:1:230:48ff:fec4:813a");
     270                CPPUNIT_ASSERT( !ta.is_multicast() );
     271                ta.set_ip("FF01:0:0:0:0:0:0:1");
     272                CPPUNIT_ASSERT( ta.is_multicast() );
     273        }
    258274};
    259275
  • protlib/branches/20090723-multicast/test/test_runner.cpp

    r4156 r4157  
    1616
    1717
     18#include "threadsafe_db.h"
    1819#include "logfile.h"
    1920
     
    4243        }
    4344
     45        protlib::tsdb::init();
     46
    4447        TestResult controller;
    4548
     
    5760        outputter.write();
    5861
     62        protlib::tsdb::end();
     63
    5964        return result.wasSuccessful() ? 0 : 1;
    6065}
Note: See TracChangeset for help on using the changeset viewer.