Changeset 30083
- Timestamp:
- 09/24/14 14:18:12 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/httpd.h
r30052 r30083 641 641 } 642 642 643 int translate = 0; 644 if(ostrstr(filename, ".html") != NULL) 645 { 646 translate = 1; 647 debug(250, "filename: %s", filename); 648 debug(250, "fullfilename: %s/%s", getconfig("httpdpath", NULL), filename); 649 debug(250, "buf1: %s", buf); 650 } 651 643 652 //TODO: 644 653 int readret = 1; … … 646 655 { 647 656 readret = dvbreadfd(filefd, buf, 0, MINMALLOC, 1000, 0); 657 if(translate == 1) 658 debug(250, "buf2: %s", buf); 659 660 if(translate == 1) 661 { 662 while(ostrstr(buf, "_\(\"") != NULL) 663 { 664 char* tmpstr1 = string_resub("_(\"", "\")", buf, 0); 665 char* tmpstr2 = ostrcat("_(\"", tmpstr1, 0, 0); 666 tmpstr2 = ostrcat(tmpstr2, "\")", 1, 0); 667 668 debug(250, "######################################"); 669 debug(250, "Search string: %s", tmpstr2); 670 debug(250, "Replace string: %s", tmpstr1); 671 debug(250, "Replace %s -> %s", tmpstr2, tmpstr1); 672 debug(250, "######################################"); 673 674 buf = string_replace_all(tmpstr2, _(tmpstr1), buf, 1); 675 free(tmpstr1), tmpstr1 = NULL; 676 free(tmpstr2), tmpstr2 = NULL; 677 } 678 679 debug(250, "buf3....................: %s", buf); 680 } 648 681 if(readret > 0) 649 682 socksend(connfd, buf, readret, 5000 * 1000); 683 650 684 } 651 685 }
Note: See TracChangeset
for help on using the changeset viewer.