Changeset 858 for branches/prototype-v0
- Timestamp:
- Nov 24, 2017, 1:18:04 PM (7 years ago)
- Location:
- branches/prototype-v0/zoo-project/zoo-kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-kernel/server_internal.c
r854 r858 1109 1109 removeService(conf,pid); 1110 1110 #endif 1111 /* 1111 /* No need to call 7_1 when an execution is dismissed. 1112 1112 fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__); 1113 1113 invokeCallback(conf,NULL,NULL,7,1); -
branches/prototype-v0/zoo-project/zoo-kernel/ulinet.c
r854 r858 245 245 char *curs=strtok(hosts,","); 246 246 while(curs!=NULL){ 247 fprintf(stderr,"### %s %d %s \n",__FILE__,__LINE__,strstr(url,curs));248 fflush(stderr);249 247 if(strstr(url,curs)==NULL) 250 248 res="OTHER"; 251 249 else{ 252 250 res="SHARED"; 253 fprintf(stderr,"### %s %d %s \n",__FILE__,__LINE__,"SHARED");254 fflush(stderr);255 251 return res; 256 252 } … … 295 291 char* host; 296 292 while(token!=NULL && cnt<=1){ 297 fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,token);298 if(cnt==1)299 fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,strstr(protectedHosts,token));300 fflush(stderr);301 293 if(cnt==1 && strstr(protectedHosts,token)!=NULL){ 302 fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,strstr(protectedHosts,token));303 294 return 1; 304 295 } … … 343 334 tmp1[5+j+1]='\0'; 344 335 } 345 fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,tmp1);346 //dumpMaps(conf);347 336 tmpMap = getMapFromMaps(conf,"renv",tmp1); 348 337 if(tmpMap!=NULL){ 349 fprintf(stderr,"add header %s %s\n",token,tmpMap->value);350 fflush(stderr);351 338 AddMissingHeaderEntry(&handle->ihandle[i],token,tmpMap->value); 352 339 } … … 430 417 struct MemoryStruct header; 431 418 432 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);433 fflush(stderr);434 419 hInternet->ihandle[hInternet->nb].handle=curl_easy_init( ); 435 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);436 fflush(stderr);437 420 hInternet->ihandle[hInternet->nb].hasCacheFile=0; 438 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);439 fflush(stderr);440 421 hInternet->ihandle[hInternet->nb].nDataAlloc = 0; 441 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);442 fflush(stderr);443 422 hInternet->ihandle[hInternet->nb].url = NULL; 444 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);445 fflush(stderr);446 423 hInternet->ihandle[hInternet->nb].mimeType = NULL; 447 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);448 fflush(stderr);449 424 hInternet->ihandle[hInternet->nb].cookie = NULL; 450 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);451 fflush(stderr);452 425 hInternet->ihandle[hInternet->nb].nDataLen = 0; 453 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);454 fflush(stderr);455 426 hInternet->ihandle[hInternet->nb].id = hInternet->nb; 456 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);457 fflush(stderr);458 427 hInternet->ihandle[hInternet->nb].nDataAlloc = 0; 459 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);460 fflush(stderr);461 428 hInternet->ihandle[hInternet->nb].pabyData = NULL; 462 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);463 fflush(stderr);464 429 hInternet->ihandle[hInternet->nb].post = NULL; 465 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);466 fflush(stderr);467 430 468 431 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_COOKIEFILE, "ALL"); 469 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);470 fflush(stderr);471 432 #ifndef TIGER 472 433 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_COOKIELIST, "ALL"); 473 434 #endif 474 435 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_USERAGENT, hInternet->agent); 475 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);476 fflush(stderr);477 436 478 437 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_FOLLOWLOCATION,1); 479 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);480 fflush(stderr);481 438 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_MAXREDIRS,3); 482 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);483 fflush(stderr);484 439 485 440 header.memory=NULL; … … 487 442 488 443 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_HEADERFUNCTION, header_write_data); 489 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);490 fflush(stderr);491 444 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_WRITEHEADER, (void *)&header); 492 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);493 fflush(stderr);494 445 495 446 #ifdef MSG_LAF_VERBOSE … … 520 471 break; 521 472 } 522 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);523 fflush(stderr);524 473 #ifdef ULINET_DEBUG 525 474 fprintf(stderr,"URL (%s)\nBODY (%s)\n",lpszUrl,lpszHeaders); … … 539 488 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_POSTFIELDSIZE,(long)dwHeadersLength); 540 489 } 541 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);542 fflush(stderr);543 490 if(hInternet->ihandle[hInternet->nb].header!=NULL) 544 491 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_HTTPHEADER,hInternet->ihandle[hInternet->nb].header); 545 492 546 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);547 fflush(stderr);548 493 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_URL,lpszUrl); 549 494 hInternet->ihandle[hInternet->nb].url = zStrdup(lpszUrl); 550 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);551 fflush(stderr);552 495 553 496 curl_multi_add_handle(hInternet->handle,hInternet->ihandle[hInternet->nb].handle); 554 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);555 fflush(stderr);556 497 557 498 hInternet->ihandle[hInternet->nb].header=NULL; 558 fprintf(stderr,"%s %d\n",__FILE__,__LINE__);559 fflush(stderr);560 499 ++hInternet->nb; 561 500 hInternet->ihandle[hInternet->nb].header=NULL; … … 579 518 int i=0; 580 519 do{ 581 curl_multi_perform(hInternet->handle, &still_running); 520 if(curl_multi_perform(hInternet->handle, &still_running)==CURLM_OK) 521 if(still_running){ 522 struct timespec tv; 523 tv.tv_sec = 0; 524 tv.tv_nsec = (long) 5*1e+9; 525 nanosleep(&tv, &tv); 526 } 582 527 }while(still_running); 583 528 for(i=0;i<hInternet->nb;i++){ 584 529 char *tmp; 585 fprintf(stderr," *** %s %d %d \n",__FILE__,__LINE__,i);586 530 curl_easy_getinfo(hInternet->ihandle[i].handle,CURLINFO_CONTENT_TYPE,&tmp); 587 fprintf(stderr," *** %s %d %d \n",__FILE__,__LINE__,i);588 531 if(tmp!=NULL) 589 532 hInternet->ihandle[i].mimeType=strdup(tmp); 590 fprintf(stderr," *** %s %d %d \n",__FILE__,__LINE__,i);591 533 curl_easy_getinfo(hInternet->ihandle[i].handle,CURLINFO_RESPONSE_CODE,&hInternet->ihandle[i].code); 592 fprintf(stderr," *** %s %d %d \n",__FILE__,__LINE__,i);593 534 curl_multi_remove_handle(hInternet->handle, hInternet->ihandle[i].handle); 594 fprintf(stderr," *** %s %d %d \n",__FILE__,__LINE__,i);595 535 curl_easy_cleanup(hInternet->ihandle[i].handle); 596 fprintf(stderr," *** %s %d %d \n",__FILE__,__LINE__,i);597 //fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,hInternet->ihandle[i].mimeType);598 //fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,hInternet->ihandle[i].pabyData);599 536 } 600 537 return 0;
Note: See TracChangeset
for help on using the changeset viewer.