Commit 5c8acc49 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Put correct owner address in SAP-generated SDP

parent 0f55beac
......@@ -257,9 +257,6 @@ struct session_descriptor_t
struct announce_method_t
{
int i_type;
/* For SAP */
char *psz_address; /* If we use a custom address */
};
......@@ -291,7 +288,7 @@ struct sap_handler_t
int i_current_session;
int (*pf_add) ( sap_handler_t*, session_descriptor_t *,announce_method_t*);
int (*pf_add) ( sap_handler_t*, session_descriptor_t *);
int (*pf_del) ( sap_handler_t*, session_descriptor_t *);
/* private data, not in p_sys as there is one kind of sap_handler_t */
......
......@@ -92,7 +92,7 @@ struct module_symbols_t
int (*__net_OpenTCP_inner) (vlc_object_t *p_this, const char *psz_host, int i_port);
int * (*__net_ListenTCP_inner) (vlc_object_t *, const char *, int);
int (*__net_Accept_inner) (vlc_object_t *, int *, mtime_t);
int (*__net_OpenUDP_inner) (vlc_object_t *p_this, char *psz_bind, int i_bind, char *psz_server, int i_server);
int (*__net_OpenUDP_inner) (vlc_object_t *p_this, const char *psz_bind, int i_bind, const char *psz_server, int i_server);
void (*net_Close_inner) (int fd);
int (*__net_Read_inner) (vlc_object_t *p_this, int fd, v_socket_t *, uint8_t *p_data, int i_data, vlc_bool_t b_retry);
int (*__net_ReadNonBlock_inner) (vlc_object_t *p_this, int fd, v_socket_t *, uint8_t *p_data, int i_data, mtime_t i_wait);
......
......@@ -361,8 +361,6 @@ static int Open( vlc_object_t *p_this )
}
vlc_UrlClean( &url );
/* FIXME: Free p_method */
if( p_method->psz_address) free( p_method->psz_address );
free( p_method );
}
......
......@@ -199,14 +199,10 @@ announce_method_t * sout_AnnounceMethodCreate( int i_type )
announce_method_t *p_method;
p_method = (announce_method_t *)malloc( sizeof(announce_method_t) );
if( p_method == NULL )
return NULL;
if( p_method )
{
p_method->i_type = i_type;
if( i_type == METHOD_TYPE_SAP )
/* Default value */
p_method->psz_address = NULL;
}
p_method->i_type = i_type;
return p_method;
}
......@@ -286,7 +282,7 @@ int announce_Register( announce_handler_t *p_announce,
}
/* this will set p_session->p_sap for later deletion */
msg_Dbg( p_announce, "adding SAP session");
p_announce->p_sap->pf_add( p_announce->p_sap, p_session, p_method );
p_announce->p_sap->pf_add( p_announce->p_sap, p_session );
}
else if( p_method->i_type == METHOD_TYPE_SLP )
{
......
This diff is collapsed.
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