浏览代码

pike: use core search functions

Daniel-Constantin Mierla 5 年之前
父节点
当前提交
138097c19b
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/modules/pike/pike_rpc.c

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

@@ -26,6 +26,7 @@
 #include "../../core/timer.h"	/* ticks_t */
 #include "../../core/timer.h"	/* ticks_t */
 
 
 #include "../../core/dprint.h"
 #include "../../core/dprint.h"
+#include "../../core/ut.h"
 #include "pike_top.h"
 #include "pike_top.h"
 
 
 #include <stdlib.h>
 #include <stdlib.h>
@@ -128,11 +129,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 ( strcasestr(stropts, "ALL") ) {
+	if ( strz_casesearch_strz(stropts, "ALL") ) {
 		options = NODE_STATUS_ALL;
 		options = NODE_STATUS_ALL;
-	} else if ( strcasestr(stropts, "HOT") ) {
+	} else if ( strz_casesearch_strz(stropts, "HOT") ) {
 		options |= NODE_STATUS_HOT;
 		options |= NODE_STATUS_HOT;
-	} else if ( strcasestr(stropts, "WARM") ) {
+	} else if ( strz_casesearch_strz(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);