Commit 91a2e7012bda6345c6267bef2ae2d55e063a2b89

Con Kolivas 2011-08-26T12:12:54

Actually check the value returned for the x-roll-ntime extension to make sure it isn't saying N.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/util.c b/util.c
index 13ad6e8..96b32ae 100644
--- a/util.c
+++ b/util.c
@@ -227,9 +227,12 @@ static size_t resp_hdr_cb(void *ptr, size_t size, size_t nmemb, void *user_data)
 		applog(LOG_DEBUG, "HTTP hdr(%s): %s", key, val);
 
 	if (!strcasecmp("X-Roll-Ntime", key)) {
-		if (opt_debug)
-			applog(LOG_DEBUG, "X-Roll-Ntime found");
-		hi->has_rolltime = true;
+		if (!strcasecmp("Y", val)) {
+			if (opt_debug)
+				applog(LOG_DEBUG, "X-Roll-Ntime: Y found");
+			hi->has_rolltime = true;
+		} else if (opt_debug)
+			applog(LOG_DEBUG, "X-Roll-Ntime: N found");
 	}
 
 	if (!strcasecmp("X-Long-Polling", key)) {