Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /minidlna.c [df2b72] .. [b6d764] Maximize Restore

  Switch to side-by-side view

--- a/minidlna.c
+++ b/minidlna.c
@@ -983,7 +983,13 @@
 			FD_SET(shttpl, &readset);
 			max_fd = MAX( max_fd, shttpl);
 		}
-
+#ifdef TIVO_SUPPORT
+		if (sbeacon >= 0) 
+		{
+			FD_SET(sbeacon, &readset);
+			max_fd = MAX(max_fd, sbeacon);
+		}
+#endif
 		i = 0;	/* active HTTP connections count */
 		for(e = upnphttphead.lh_first; e != NULL; e = e->entries.le_next)
 		{
@@ -994,14 +1000,13 @@
 				i++;
 			}
 		}
+#ifdef DEBUG
 		/* for debug */
-#ifdef DEBUG
 		if(i > 1)
 		{
 			DPRINTF(E_DEBUG, L_GENERAL, "%d active incoming HTTP connections\n", i);
 		}
 #endif
-
 		FD_ZERO(&writeset);
 		upnpevents_selectfds(&readset, &writeset, &max_fd);
 
@@ -1018,6 +1023,13 @@
 			/*DPRINTF(E_DEBUG, L_GENERAL, "Received UDP Packet\n");*/
 			ProcessSSDPRequest(sudp, (unsigned short)runtime_vars.port);
 		}
+#ifdef TIVO_SUPPORT
+		if(sbeacon >= 0 && FD_ISSET(sbeacon, &readset))
+		{
+			/*DPRINTF(E_DEBUG, L_GENERAL, "Received UDP Packet\n");*/
+			ProcessTiVoBeacon(sbeacon);
+		}
+#endif
 		/* increment SystemUpdateID if the content database has changed,
 		 * and if there is an active HTTP connection, at most once every 2 seconds */
 		if( i && (time(NULL) >= (lastupdatetime.tv_sec + 2)) )