Fixed previous commit (one var can be NULL)

This commit is contained in:
Martin Pulec
2014-12-19 17:03:56 +01:00
parent c299654f54
commit 96ca460068
3 changed files with 4 additions and 4 deletions

View File

@@ -141,7 +141,7 @@ rtp_video_rxtx::rtp_video_rxtx(map<string, param_u> const &params) :
}
if ((m_network_devices = initialize_network(m_requested_receiver.c_str(), m_recv_port_number, m_send_port_number,
m_participants, m_ipv6, m_requested_mcast_if.c_str()))
m_participants, m_ipv6, m_requested_mcast_if))
== NULL) {
throw string("Unable to open network");
} else {
@@ -199,7 +199,7 @@ void rtp_video_rxtx::change_tx_port(int tx_port)
m_send_port_number = tx_port;
m_network_devices = initialize_network(m_requested_receiver.c_str(), m_recv_port_number,
m_send_port_number, m_participants, m_ipv6,
m_requested_mcast_if.c_str());
m_requested_mcast_if);
if (!m_network_devices) {
throw string("Changing RX port failed!\n");
}

View File

@@ -76,7 +76,7 @@ protected:
int m_recv_port_number;
int m_send_port_number;
bool m_ipv6;
std::string m_requested_mcast_if;
const char *m_requested_mcast_if;
fec *m_fec_state;
private:
void process_message(struct msg_sender *);

View File

@@ -181,7 +181,7 @@ void ultragrid_rtp_video_rxtx::receiver_process_messages()
m_network_devices = initialize_network(m_requested_receiver.c_str(),
m_recv_port_number,
m_send_port_number, m_participants, m_ipv6,
m_requested_mcast_if.c_str());
m_requested_mcast_if);
if (!m_network_devices) {
throw runtime_error("Changing RX port failed!");
}