gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/rtmp r9762: don't try to poll if we have n


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/rtmp r9762: don't try to poll if we have no pollfds supplied.
Date: Fri, 21 Nov 2008 09:43:42 -0700
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9762
committer: address@hidden
branch nick: rtmp
timestamp: Fri 2008-11-21 09:43:42 -0700
message:
  don't try to poll if we have no pollfds supplied.
modified:
  libnet/network.cpp
=== modified file 'libnet/network.cpp'
--- a/libnet/network.cpp        2008-11-19 20:13:25 +0000
+++ b/libnet/network.cpp        2008-11-21 16:43:42 +0000
@@ -258,7 +258,7 @@
 int
 Network::newConnection(bool block, int fd)
 {
-  //    GNASH_REPORT_FUNCTION;
+//    GNASH_REPORT_FUNCTION;
 
     struct sockaddr    newfsin;
     socklen_t          alen;
@@ -471,7 +471,7 @@
 bool
 Network::createClient(const string &hostname, short port)
 {
-    GNASH_REPORT_FUNCTION;
+//    GNASH_REPORT_FUNCTION;
 
     struct sockaddr_in  sock_in;
     fd_set              fdset;
@@ -982,9 +982,13 @@
 Network::waitForNetData(int limit, struct pollfd *fds)
 {
     GNASH_REPORT_FUNCTION;
-    
+
     boost::shared_ptr<vector<struct pollfd> > hits(new vector<struct pollfd>);
 
+    if (fds == 0) {
+       return hits;
+    }
+    
     int ret = poll(fds, limit, _timeout);
 
     log_debug("Poll returned: %d, timeout is: %d", ret, _timeout);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]