+ m_p->m_ports = ports;
+
+ m_p->az = new mp::ZAssocServer *[m_p->m_ports.size()];
+
+ // Create mp::ZAssocServer for each port
+ size_t i;
+ for (i = 0; i<m_p->m_ports.size(); i++)
+ {
+ // create a PDU assoc object (one per mp::ZAssocServer)
+ yazpp_1::PDU_Assoc *as = new yazpp_1::PDU_Assoc(&m_p->mySocketManager);
+
+ // create ZAssoc with PDU Assoc
+ m_p->az[i] = new mp::ZAssocServer(as,
+ m_p->m_session_timeout,
+ m_p->m_connect_max,
+ m_p->m_ports[i].route,
+ m_p->m_msg_config.length() > 0 ?
+ m_p->m_msg_config.c_str() : 0);
+ if (m_p->az[i]->server(m_p->m_ports[i].port.c_str()))
+ {
+ throw mp::filter::FilterException("Unable to bind to address "
+ + std::string(m_p->m_ports[i].port));
+ }
+ }