@@ -87,6 +87,8 @@ struct rtp_rxtx_common_priv_state {
8787 // / message and also the send/receive handling is not entirely
8888 // / symetric).
8989 struct module m_rtp_sender_mod;
90+
91+ bool used;
9092};
9193
9294static struct rtp *initialize_network (const char *addr, int recv_port,
@@ -166,7 +168,7 @@ rtp_process_sender_message(struct rtp_rxtx_common *s, struct msg_sender *msg)
166168
167169 // Exit only if we failed because of command line
168170 // params, not control port msg
169- if (s->used ) {
171+ if (s->priv -> used ) {
170172 exit_uv (rc);
171173 }
172174
@@ -210,8 +212,10 @@ rtp_process_sender_message(struct rtp_rxtx_common *s, struct msg_sender *msg)
210212 return new_response (RESPONSE_OK, nullptr );
211213}
212214
213- void rtp_process_sender_messages (struct rtp_rxtx_common *s)
215+ void rtp_rxtx_sender_do_housekeeping (struct rtp_rxtx_common *s)
214216{
217+ s->priv ->used = true ;
218+
215219 struct message *msg_external = nullptr ;
216220 while ((msg_external = check_message (&s->priv ->m_rtp_sender_mod )) !=
217221 nullptr ) {
@@ -266,7 +270,7 @@ struct rtp_rxtx_common *rtp_rxtx_common_init(const struct vrxtx_params *params,
266270 // The idea of doing that is to display help on '-f ldgm:help' even if UG would exit
267271 // immediately. The encoder is actually created by a message.
268272 // Also for `-x sdp:help` the message will get discarded and the warning that message quie
269- rtp_process_sender_messages (s);
273+ rtp_rxtx_sender_do_housekeeping (s);
270274
271275 return s;
272276}
0 commit comments