[vlc-devel] commit: SAP: revert most of [a8eb03fa] ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Aug 6 19:12:24 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Aug 6 20:14:47 2008 +0300| [73c7d57892f5f1e8439b0fbdbe5fbe9349c78a22] | committer: Rémi Denis-Courmont
SAP: revert most of [a8eb03fa]
Especially POLLHUP makes no sense in events.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=73c7d57892f5f1e8439b0fbdbe5fbe9349c78a22
---
modules/services_discovery/sap.c | 18 +-----------------
1 files changed, 1 insertions(+), 17 deletions(-)
diff --git a/modules/services_discovery/sap.c b/modules/services_discovery/sap.c
index d0d1144..ff4b739 100644
--- a/modules/services_discovery/sap.c
+++ b/modules/services_discovery/sap.c
@@ -556,8 +556,6 @@ static void Run( services_discovery_t *p_sd )
return;
}
- vlc_object_lock( p_sd );
-
/* read SAP packets */
while( vlc_object_alive( p_sd ) )
{
@@ -573,20 +571,9 @@ static void Run( services_discovery_t *p_sd )
/* Make sure we track vlc_object_signal() */
ufd[n].fd = vlc_object_waitpipe( p_sd );
- ufd[n].events = POLLIN | POLLHUP;
+ ufd[n].events = POLLIN;
ufd[n].revents = 0;
- if( ufd[n].fd == -1 )
- {
- /* On windows, fd will be -1, as we can't select on a pipe()-ed
- * fildes. Because we have no other solution to track that
- * object is killed, we make sure the timeout won't be to long. */
- if( timeout > 1000 || timeout == -1 )
- timeout = 1000;
- }
-
- vlc_object_unlock( p_sd );
-
if (poll (ufd, n+1, timeout) > 0)
{
for (unsigned i = 0; i < n; i++)
@@ -644,10 +631,7 @@ static void Run( services_discovery_t *p_sd )
timeout = -1; /* We can safely poll indefinitly. */
else if( timeout < 200 )
timeout = 200; /* Don't wakeup too fast. */
-
- vlc_object_lock( p_sd );
}
- vlc_object_unlock( p_sd );
}
/**********************************************************************
More information about the vlc-devel
mailing list