Jelajahi Sumber

pike: rpc pike.top - support for case insensitive match of parameter

Daniel-Constantin Mierla 5 tahun lalu
induk
melakukan
5267f4d8e8
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      src/modules/pike/pike_rpc.c

+ 3 - 3
src/modules/pike/pike_rpc.c

@@ -128,11 +128,11 @@ static void pike_top(rpc_t *rpc, void *c)
 		stropts = "HOT";
 		stropts = "HOT";
 
 
 	DBG("pike:top: string options: '%s'", stropts);
 	DBG("pike:top: string options: '%s'", stropts);
-	if ( strstr(stropts, "ALL") ) {
+	if ( strcasestr(stropts, "ALL") ) {
 		options = NODE_STATUS_ALL;
 		options = NODE_STATUS_ALL;
-	} else if ( strstr(stropts, "HOT") ) {
+	} else if ( strcasestr(stropts, "HOT") ) {
 		options |= NODE_STATUS_HOT;
 		options |= NODE_STATUS_HOT;
-	} else if ( strstr(stropts, "WARM") ) {
+	} else if ( strcasestr(stropts, "WARM") ) {
 		options |= NODE_STATUS_WARM;
 		options |= NODE_STATUS_WARM;
 	}
 	}
 	DBG("pike:top: options: 0x%02x\n", options);
 	DBG("pike:top: options: 0x%02x\n", options);