@@ -248,11 +248,12 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
248248 LPCXSTR lpszParamImage = _X (" image" );
249249 LPCXSTR lpszParamDeamon = _X (" deamon" );
250250 LPCXSTR lpszParamMachine = _X (" machine" );
251+ LPCXSTR lpszParamAVRecord = _X (" avrecord" );
251252
252253 memset (tszKey, ' \0 ' , XPATH_MAX);
253254 memset (tszValue, ' \0 ' , XPATH_MAX);
254255
255- if (0 != _tcsxnicmp (lpszFuncName, tszUrlName, _tcsxlen (lpszFuncName)))
256+ if (0 != _tcsxncmp (lpszFuncName, tszUrlName, _tcsxlen (lpszFuncName)))
256257 {
257258 st_HDRParam.nHttpCode = 404 ;
258259 HttpProtocol_Server_SendMsgEx (xhHTTPPacket, tszSDBuffer, &nSDLen, &st_HDRParam);
@@ -263,7 +264,7 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
263264 }
264265 // 获得函数名
265266 BaseLib_String_GetKeyValue (pptszList[0 ], " =" , tszKey, tszValue);
266- if (0 != _tcsxnicmp (lpszParamFuncKey, tszKey, _tcsxlen (lpszParamFuncKey)))
267+ if (0 != _tcsxncmp (lpszParamFuncKey, tszKey, _tcsxlen (lpszParamFuncKey)))
267268 {
268269 st_HDRParam.nHttpCode = 404 ;
269270 HttpProtocol_Server_SendMsgEx (xhHTTPPacket, tszSDBuffer, &nSDLen, &st_HDRParam);
@@ -279,57 +280,57 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
279280 XEngine_PluginTask_Handle (tszValue, lpszClientAddr, lpszMSGBuffer, nMSGLen, &pptszList, nListCount, nPluginType);
280281 return true ;
281282 }
282- if (0 == _tcsxnicmp (lpszMethodPost, pSt_HTTPParam->tszHttpMethod , _tcsxlen (lpszMethodPost)))
283+ if (0 == _tcsxncmp (lpszMethodPost, pSt_HTTPParam->tszHttpMethod , _tcsxlen (lpszMethodPost)))
283284 {
284- if (0 == _tcsxnicmp (lpszParamP2PClient, tszValue, _tcsxlen (lpszParamP2PClient)))
285+ if (0 == _tcsxncmp (lpszParamP2PClient, tszValue, _tcsxlen (lpszParamP2PClient)))
285286 {
286287 // 是不是P2P
287288 memset (tszKey, ' \0 ' , sizeof (tszKey));
288289 memset (tszValue, ' \0 ' , sizeof (tszValue));
289290 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszValue);
290291 HTTPTask_TastPost_P2PClient (lpszClientAddr, lpszMSGBuffer, nMSGLen, _ttxoi (tszValue));
291292 }
292- else if (0 == _tcsxnicmp (lpszParamZIPCode, tszValue, _tcsxlen (lpszParamZIPCode)))
293+ else if (0 == _tcsxncmp (lpszParamZIPCode, tszValue, _tcsxlen (lpszParamZIPCode)))
293294 {
294295 // 邮政信息:http://app.xyry.org:5501/api?function=zipcode¶ms1=0
295296 memset (tszKey, ' \0 ' , sizeof (tszKey));
296297 memset (tszValue, ' \0 ' , sizeof (tszValue));
297298 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszValue);
298299 HTTPTask_TastPost_PostCode (lpszClientAddr, lpszMSGBuffer, nMSGLen, _ttxoi (tszValue));
299300 }
300- else if (0 == _tcsxnicmp (lpszParamXLog, tszValue, _tcsxlen (lpszParamXLog)))
301+ else if (0 == _tcsxncmp (lpszParamXLog, tszValue, _tcsxlen (lpszParamXLog)))
301302 {
302303 // 日志信息:http://app.xyry.org:5501/api?function=log¶ms1=0
303304 memset (tszKey, ' \0 ' , sizeof (tszKey));
304305 memset (tszValue, ' \0 ' , sizeof (tszValue));
305306 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszValue);
306307 HTTPTask_TastPost_LogInfo (lpszClientAddr, lpszMSGBuffer, nMSGLen, _ttxoi (tszValue));
307308 }
308- else if (0 == _tcsxnicmp (lpszParamQRCode, tszValue, _tcsxlen (lpszParamQRCode)))
309+ else if (0 == _tcsxncmp (lpszParamQRCode, tszValue, _tcsxlen (lpszParamQRCode)))
309310 {
310311 // 二维码生成:http://app.xyry.org:5501/api?function=qrcode¶ms1=0 或者 1
311312 memset (tszKey, ' \0 ' , sizeof (tszKey));
312313 memset (tszValue, ' \0 ' , sizeof (tszValue));
313314 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszValue);
314315 HTTPTask_TaskPost_QRCode (lpszClientAddr, lpszMSGBuffer, nMSGLen, _ttxoi (tszValue));
315316 }
316- else if (0 == _tcsxnicmp (lpszParamSocket, tszValue, _tcsxlen (lpszParamSocket)))
317+ else if (0 == _tcsxncmp (lpszParamSocket, tszValue, _tcsxlen (lpszParamSocket)))
317318 {
318319 // 网络测试:http://app.xyry.org:5501/api?function=socket¶ms1=0 或者 1
319320 memset (tszKey, ' \0 ' , sizeof (tszKey));
320321 memset (tszValue, ' \0 ' , sizeof (tszValue));
321322 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszValue);
322323 HTTPTask_TastPost_SocketTest (lpszClientAddr, lpszMSGBuffer, nMSGLen, _ttxoi (tszValue));
323324 }
324- else if (0 == _tcsxnicmp (lpszParamDTest, tszValue, _tcsxlen (lpszParamDTest)))
325+ else if (0 == _tcsxncmp (lpszParamDTest, tszValue, _tcsxlen (lpszParamDTest)))
325326 {
326327 // 数据测试:http://app.xyry.org:5501/api?function=dtest¶ms1=0 或者 1
327328 memset (tszKey, ' \0 ' , sizeof (tszKey));
328329 memset (tszValue, ' \0 ' , sizeof (tszValue));
329330 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszValue);
330331 HTTPTask_TastPost_DTest (lpszClientAddr, lpszMSGBuffer, nMSGLen, _ttxoi (tszValue));
331332 }
332- else if (0 == _tcsxnicmp (lpszParamShortLink, tszValue, _tcsxlen (lpszParamShortLink)))
333+ else if (0 == _tcsxncmp (lpszParamShortLink, tszValue, _tcsxlen (lpszParamShortLink)))
333334 {
334335 // 短连接:http://app.xyry.org:5501/api?function=slink¶ms1=0
335336 XCHAR tszType[64 ];
@@ -338,7 +339,7 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
338339 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszType);
339340 HTTPTask_TaskPost_ShortLink (lpszClientAddr, lpszMSGBuffer, nMSGLen, _ttxoi (tszType));
340341 }
341- else if (0 == _tcsxnicmp (lpszParamWordFilter, tszValue, _tcsxlen (lpszParamWordFilter)))
342+ else if (0 == _tcsxncmp (lpszParamWordFilter, tszValue, _tcsxlen (lpszParamWordFilter)))
342343 {
343344 // 敏感词:http://app.xyry.org:5501/api?function=wordfilter¶ms1=0
344345 XCHAR tszType[64 ];
@@ -347,7 +348,7 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
347348 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszType);
348349 HTTPTask_TastPost_WordFilter (lpszClientAddr, lpszMSGBuffer, nMSGLen, _ttxoi (tszType));
349350 }
350- else if (0 == _tcsxnicmp (lpszParamBack, tszValue, _tcsxlen (lpszParamBack)))
351+ else if (0 == _tcsxncmp (lpszParamBack, tszValue, _tcsxlen (lpszParamBack)))
351352 {
352353 // 后台管理接口:http://app.xyry.org:5501/api?function=back¶ms1=0
353354 XCHAR tszType[64 ];
@@ -363,12 +364,12 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
363364 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszType);
364365 HTTPTask_TaskPost_BackService (lpszClientAddr, lpszMSGBuffer, nMSGLen, _ttxoi (tszType));
365366 }
366- else if (0 == _tcsxnicmp (lpszParamImage, tszValue, _tcsxlen (lpszParamImage)))
367+ else if (0 == _tcsxncmp (lpszParamImage, tszValue, _tcsxlen (lpszParamImage)))
367368 {
368369 // 图像处理接口:http://app.xyry.org:5501/api?function=image¶ms1=0
369370 HTTPTask_TaskPost_Image (lpszClientAddr, lpszMSGBuffer, nMSGLen, &pptszList, nListCount);
370371 }
371- else if (0 == _tcsxnicmp (lpszParamDeamon, tszValue, _tcsxlen (lpszParamDeamon)))
372+ else if (0 == _tcsxncmp (lpszParamDeamon, tszValue, _tcsxlen (lpszParamDeamon)))
372373 {
373374 // 守护进程接口:http://app.xyry.org:5501/api?function=deamon¶ms1=0
374375 if (st_ServiceConfig.st_XVerifcation .st_VerSwitch .bDeamon && !bVerification)
@@ -380,7 +381,7 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
380381 }
381382 HTTPTask_TaskPost_Deamon (lpszClientAddr, lpszMSGBuffer, nMSGLen);
382383 }
383- else if (0 == _tcsxnicmp (lpszParamMachine, tszValue, _tcsxlen (lpszParamMachine)))
384+ else if (0 == _tcsxncmp (lpszParamMachine, tszValue, _tcsxlen (lpszParamMachine)))
384385 {
385386 // 信息收集接口:http://app.xyry.org:5501/api?function=machine¶ms1=0
386387 XCHAR tszType[64 ];
@@ -389,6 +390,22 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
389390 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszType);
390391 HTTPTask_TastPost_Machine (lpszClientAddr, lpszMSGBuffer, nMSGLen, _ttxoi (tszType));
391392 }
393+ else if (0 == _tcsxncmp (lpszParamAVRecord, tszValue, _tcsxlen (lpszParamAVRecord)))
394+ {
395+ // 信息收集接口:http://app.xyry.org:5501/api?function=avrecord¶ms1=start 或者 stop
396+ XCHAR tszType[64 ];
397+ memset (tszType, ' \0 ' , sizeof (tszType));
398+
399+ BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszType);
400+ if (0 == _tcsxncmp (_X (" start" ), tszType, 5 ))
401+ {
402+ HTTPTask_TaskPost_AVRecordStart (lpszClientAddr, lpszMSGBuffer, nMSGLen);
403+ }
404+ else
405+ {
406+ HTTPTask_TaskPost_AVRecordStop (lpszClientAddr);
407+ }
408+ }
392409 else
393410 {
394411 st_HDRParam.nHttpCode = 404 ;
@@ -397,32 +414,32 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
397414 XLOG_PRINT (xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X (" HTTP客户端:%s,发送的请求不支持:%s,内容:\r\n %s" ), lpszClientAddr, tszGBKBuffer, lpszMSGBuffer);
398415 }
399416 }
400- else if (0 == _tcsxnicmp (lpszMethodGet, pSt_HTTPParam->tszHttpMethod , _tcsxlen (lpszMethodGet)))
417+ else if (0 == _tcsxncmp (lpszMethodGet, pSt_HTTPParam->tszHttpMethod , _tcsxlen (lpszMethodGet)))
401418 {
402- if (0 == _tcsxnicmp (lpszParamReload, tszValue, _tcsxlen (lpszParamReload)))
419+ if (0 == _tcsxncmp (lpszParamReload, tszValue, _tcsxlen (lpszParamReload)))
403420 {
404421 // 是不是配置重载
405422 memset (tszKey, ' \0 ' , sizeof (tszKey));
406423 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszValue);
407424 HTTPTask_TaskGet_Reload (lpszClientAddr, tszValue);
408425 }
409- else if (0 == _tcsxnicmp (lpszParamIDCard, tszValue, _tcsxlen (lpszParamIDCard)))
426+ else if (0 == _tcsxncmp (lpszParamIDCard, tszValue, _tcsxlen (lpszParamIDCard)))
410427 {
411428 // 是不是身份证查询
412429 memset (tszKey, ' \0 ' , sizeof (tszKey));
413430 memset (tszValue, ' \0 ' , sizeof (tszValue));
414431 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszValue);
415432 HTTPTask_TaskGet_IDCard (lpszClientAddr, tszValue);
416433 }
417- else if (0 == _tcsxnicmp (lpszParamBank, tszValue, _tcsxlen (lpszParamBank)))
434+ else if (0 == _tcsxncmp (lpszParamBank, tszValue, _tcsxlen (lpszParamBank)))
418435 {
419436 // 是不是银行卡信息
420437 memset (tszKey, ' \0 ' , sizeof (tszKey));
421438 memset (tszValue, ' \0 ' , sizeof (tszValue));
422439 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszValue);
423440 HTTPTask_TaskGet_BankInfo (lpszClientAddr, tszValue);
424441 }
425- else if (0 == _tcsxnicmp (lpszParamTranslation, tszValue, _tcsxlen (lpszParamTranslation)))
442+ else if (0 == _tcsxncmp (lpszParamTranslation, tszValue, _tcsxlen (lpszParamTranslation)))
426443 {
427444 // 是不是翻译
428445 XCHAR tszMSGBuffer[2048 ] = {};
@@ -434,7 +451,7 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
434451 BaseLib_String_GetKeyValue (pptszList[3 ], " =" , tszKey, tszDstBuffer);
435452 HTTPTask_TaskGet_Translation (lpszClientAddr, tszMSGBuffer, tszSrcBuffer, tszDstBuffer);
436453 }
437- else if (0 == _tcsxnicmp (lpszParamLocker, tszValue, _tcsxlen (lpszParamLocker)))
454+ else if (0 == _tcsxncmp (lpszParamLocker, tszValue, _tcsxlen (lpszParamLocker)))
438455 {
439456 // 是不是分布式锁
440457 XCHAR tszLockToken[128 ];
@@ -448,15 +465,15 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
448465 BaseLib_String_GetKeyValue (pptszList[2 ], " =" , tszKey, tszLockType);
449466 HTTPTask_TaskGet_Locker (lpszClientAddr, _ttxoll (tszLockToken), (ENUM_XENGINE_APISERVICE_LOCKER_TYPE)_ttxoi (tszLockType));
450467 }
451- else if (0 == _tcsxnicmp (lpszParamWeather, tszValue, _tcsxlen (lpszParamWeather)))
468+ else if (0 == _tcsxncmp (lpszParamWeather, tszValue, _tcsxlen (lpszParamWeather)))
452469 {
453470 // 天气:http://127.0.0.1:5501/api?function=weather¶ms1=110101
454471 XCHAR tszIDAddr[128 ] = {};
455472
456473 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszIDAddr);
457474 HTTPTask_TaskGet_WeatherInfo (lpszClientAddr, tszIDAddr);
458475 }
459- else if (0 == _tcsxnicmp (lpszParamRegion, tszValue, _tcsxlen (lpszParamRegion)))
476+ else if (0 == _tcsxncmp (lpszParamRegion, tszValue, _tcsxlen (lpszParamRegion)))
460477 {
461478 // 地区ID:http://127.0.0.1:5501/api?function=region&type=1¶ms=省份¶ms=市区¶ms=县级
462479 int nType = 0 ;
@@ -500,15 +517,15 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST
500517 }
501518 }
502519 }
503- else if (0 == _tcsxnicmp (lpszParamOil, tszValue, _tcsxlen (lpszParamOil)))
520+ else if (0 == _tcsxncmp (lpszParamOil, tszValue, _tcsxlen (lpszParamOil)))
504521 {
505522 // 油价:http://127.0.0.1:5501/api?function=oil¶m=地区
506523 memset (tszValue, ' \0 ' , sizeof (tszValue));
507524
508525 BaseLib_String_GetKeyValue (pptszList[1 ], " =" , tszKey, tszValue);
509526 HTTPTask_TaskGet_Oil (lpszClientAddr, tszValue);
510527 }
511- else if ((0 == _tcsxnicmp (lpszParamPhone, tszValue, _tcsxlen (lpszParamPhone))) || (0 == _tcsxnicmp (lpszParamIPAddr, tszValue, _tcsxlen (lpszParamIPAddr))) || (0 == _tcsxnicmp (lpszParamMacInfo, tszValue, _tcsxlen (lpszParamMacInfo))))
528+ else if ((0 == _tcsxncmp (lpszParamPhone, tszValue, _tcsxlen (lpszParamPhone))) || (0 == _tcsxncmp (lpszParamIPAddr, tszValue, _tcsxlen (lpszParamIPAddr))) || (0 == _tcsxncmp (lpszParamMacInfo, tszValue, _tcsxlen (lpszParamMacInfo))))
512529 {
513530 // phone:http://127.0.0.1:5501/api?function=phone¶m=1369943
514531 // ip:http://127.0.0.1:5501/api?function=ip¶m=117.172.221.14&language=en
0 commit comments