Commit 83bf0a09 authored by Simon Morlat's avatar Simon Morlat

fix pktinfo not set when re-creating sockets

parent 02ce979c
......@@ -407,9 +407,11 @@ struct _RtpSession
bool_t permissive; /*use the permissive algorithm*/
bool_t use_connect; /* use connect() on the socket */
bool_t ssrc_set;
bool_t reuseaddr; /*setsockopt SO_REUSEADDR */
bool_t rtcp_mux;
unsigned char avpf_features; /**< A bitmask of ORTP_AVPF_FEATURE_* macros. */
bool_t use_pktinfo;
rtp_stats_t stats;
};
......
......@@ -381,6 +381,7 @@ rtp_session_set_local_addr (RtpSession * session, const char * addr, int rtp_por
rtp_session_set_dscp( session, -1 );
rtp_session_set_multicast_ttl( session, -1 );
rtp_session_set_multicast_loopback( session, -1 );
if (session->use_pktinfo) rtp_session_set_pktinfo(session, TRUE);
ortp_message("RtpSession bound to [%s] ports [%i] [%i]", addr, rtp_port, rtcp_port);
return 0;
}
......@@ -450,7 +451,7 @@ int rtp_session_set_pktinfo(RtpSession *session, int activate)
int *optval = &activate;
int optlen = sizeof(activate);
#endif
session->use_pktinfo = activate;
// Dont't do anything if socket hasn't been created yet
if (session->rtp.gs.socket == (ortp_socket_t)-1) return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment