Diff of /tivo_beacon.c [db1b9d] .. [77c30b] Maximize Restore

  Switch to side-by-side view

--- a/tivo_beacon.c
+++ b/tivo_beacon.c
@@ -173,23 +173,23 @@
  * Returns true if this was a broadcast beacon msg
  */
 int
-rcvBeaconMessage(char * beacon)
-{
-	char * tivoConnect = NULL;
-	char * method = NULL;
-	char * identity = NULL;
-	char * machine = NULL;
-	char * platform = NULL;
-	char * services = NULL;
-	char * cp;
-	char * scp;
-	char * tokptr;
+rcvBeaconMessage(char *beacon)
+{
+	char *tivoConnect = NULL;
+	char *method = NULL;
+	char *identity = NULL;
+	char *machine = NULL;
+	char *platform = NULL;
+	char *services = NULL;
+	char *cp;
+	char *scp;
+	char *tokptr;
 
 	cp = strtok_r(beacon, "=\r\n", &tokptr);
 	while( cp != NULL )
 	{
 		scp = cp;
-		cp = strtok_r( NULL, "=\r\n", &tokptr );
+		cp = strtok_r(NULL, "=\r\n", &tokptr);
 		if( strcasecmp(scp, "tivoconnect") == 0 )
 			tivoConnect = cp;
 		else if( strcasecmp(scp, "method") == 0 )
@@ -205,12 +205,12 @@
 		cp = strtok_r(NULL, "=\r\n", &tokptr);
 	}
 
-	if( tivoConnect == NULL )
+	if( !tivoConnect || !platform || !method )
 		return 0;
 
 #ifdef DEBUG
-	static struct aBeacon* topBeacon = NULL;
-	struct aBeacon * b;
+	static struct aBeacon *topBeacon = NULL;
+	struct aBeacon *b;
 	time_t current;
 	int len;
 	char buf[32];