Commit fadec973 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

dsm: don't use netbios struct members directly

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8d48e95e
...@@ -67,16 +67,18 @@ int bdsm_SdOpen (vlc_object_t *p_this) ...@@ -67,16 +67,18 @@ int bdsm_SdOpen (vlc_object_t *p_this)
for( ssize_t i = 0; i < netbios_ns_entry_count( p_sys->ns ); i++ ) for( ssize_t i = 0; i < netbios_ns_entry_count( p_sys->ns ); i++ )
{ {
netbios_ns_entry *p_entry = netbios_ns_entry_at( p_sys->ns, i ); netbios_ns_entry *p_entry = netbios_ns_entry_at( p_sys->ns, i );
char type = netbios_ns_entry_type( p_entry );
if( p_entry->type == 0x20 ) if( type == 0x20 )
{ {
input_item_t *p_item; input_item_t *p_item;
char *psz_mrl; char *psz_mrl;
const char *name = netbios_ns_entry_name( p_entry );
if( asprintf(&psz_mrl, "smb://%s", p_entry->name) < 0 ) if( asprintf(&psz_mrl, "smb://%s", name) < 0 )
goto error; goto error;
p_item = input_item_NewWithType( psz_mrl, p_entry->name, 0, NULL, p_item = input_item_NewWithType( psz_mrl, name, 0, NULL,
0, -1, ITEM_TYPE_NODE ); 0, -1, ITEM_TYPE_NODE );
msg_Dbg( p_sd, "Adding item %s", psz_mrl ); msg_Dbg( p_sd, "Adding item %s", psz_mrl );
......
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