Browse code

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

Daniel-Constantin Mierla authored on 11/08/2020 09:22:35
Showing 1 changed files
... ...
@@ -128,11 +128,11 @@ static void pike_top(rpc_t *rpc, void *c)
128 128
 		stropts = "HOT";
129 129
 
130 130
 	DBG("pike:top: string options: '%s'", stropts);
131
-	if ( strstr(stropts, "ALL") ) {
131
+	if ( strcasestr(stropts, "ALL") ) {
132 132
 		options = NODE_STATUS_ALL;
133
-	} else if ( strstr(stropts, "HOT") ) {
133
+	} else if ( strcasestr(stropts, "HOT") ) {
134 134
 		options |= NODE_STATUS_HOT;
135
-	} else if ( strstr(stropts, "WARM") ) {
135
+	} else if ( strcasestr(stropts, "WARM") ) {
136 136
 		options |= NODE_STATUS_WARM;
137 137
 	}
138 138
 	DBG("pike:top: options: 0x%02x\n", options);