Changeset 19884
- Timestamp:
- 02/01/13 19:29:09 (11 years ago)
- Location:
- titan
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/facebook/facebook.h
r17482 r19884 90 90 } 91 91 92 gethttp(ip, path, 80, name, NULL, NULL, 0);92 gethttp(ip, path, 80, name, NULL, 5000, NULL, 0); 93 93 94 94 return 0; -
titan/plugins/gmediarender/gmediarender.h
r19038 r19884 43 43 free(cmd), cmd = NULL; 44 44 */ 45 gethttp(tmpip, path, port, "/tmp/gmediarenderpic.jpg", NULL, NULL, 0);45 gethttp(tmpip, path, port, "/tmp/gmediarenderpic.jpg", NULL, 5000, NULL, 0); 46 46 changepic(gmediarender, "/tmp/gmediarenderpic.jpg"); 47 47 drawscreen(gmediarender, 0, 0); … … 59 59 free(cmd), cmd = NULL; 60 60 */ 61 gethttp(tmpip, path, port, "/tmp/gmediarenderpic.png", NULL, NULL, 0);61 gethttp(tmpip, path, port, "/tmp/gmediarenderpic.png", NULL, 5000, NULL, 0); 62 62 changepic(gmediarender, "/tmp/gmediarenderpic.png"); 63 63 drawscreen(gmediarender, 0, 0); -
titan/plugins/imdb/imdb.h
r19304 r19884 66 66 debug(133, "search: http://www.imdb.de/%s", tmpsearch); 67 67 68 tmpstr = gethttp("www.imdb.de", tmpsearch, 80, NULL, NULL, NULL, 0);68 tmpstr = gethttp("www.imdb.de", tmpsearch, 80, NULL, NULL, 5000, NULL, 0); 69 69 70 70 debug(133, "tmpsearch: %s", tmpsearch); … … 212 212 tmpsearch = ostrcat(tmpsearch, (*first)->id, 1, 0); 213 213 214 tmpstr = gethttp("www.imdb.de", tmpsearch, 80, NULL, NULL, NULL, 0);214 tmpstr = gethttp("www.imdb.de", tmpsearch, 80, NULL, NULL, 5000, NULL, 0); 215 215 216 216 debug(133, "tmpsearch: %s", tmpsearch); … … 322 322 tmpsearch = ostrcat(tmpsearch, "/", 1, 0); 323 323 324 tmpstr = gethttp("www.imdb.de", tmpsearch, 80, NULL, NULL, NULL, 0);324 tmpstr = gethttp("www.imdb.de", tmpsearch, 80, NULL, NULL, 5000, NULL, 0); 325 325 326 326 debug(133, "tmpsearch: %s", tmpsearch); … … 344 344 tmpsearch = ostrcat(tmpsearch, "/plotsummary", 1, 0); 345 345 346 tmpstr = gethttp("www.imdb.de", tmpsearch, 80, NULL, NULL, NULL, 0);346 tmpstr = gethttp("www.imdb.de", tmpsearch, 80, NULL, NULL, 5000, NULL, 0); 347 347 348 348 debug(133, "tmpsearch: %s", tmpsearch); … … 384 384 savefile = ostrcat(savefile, (*first)->id, 1, 0); 385 385 savefile = ostrcat(savefile, "_poster.jpg", 1, 0); 386 gethttp(ip, path, 80, savefile, NULL, NULL, 0);386 gethttp(ip, path, 80, savefile, NULL, 5000, NULL, 0); 387 387 free((*first)->poster); 388 388 (*first)->poster = savefile; … … 390 390 else 391 391 { 392 gethttp(ip, path, 80, TMPIMDBPIC1, NULL, NULL, 0);392 gethttp(ip, path, 80, TMPIMDBPIC1, NULL, 5000, NULL, 0); 393 393 free((*first)->poster); 394 394 (*first)->poster = ostrcat(TMPIMDBPIC1, NULL, 0, 0); … … 416 416 savefile = ostrcat(savefile, (*first)->id, 1, 0); 417 417 savefile = ostrcat(savefile, "_thumb.jpg", 1, 0); 418 gethttp(ip, path, 80, savefile, NULL, NULL, 0);418 gethttp(ip, path, 80, savefile, NULL, 5000, NULL, 0); 419 419 free((*first)->thumb); 420 420 (*first)->thumb = savefile; … … 422 422 else 423 423 { 424 gethttp(ip, path, 80, TMPIMDBPIC2, NULL, NULL, 0);424 gethttp(ip, path, 80, TMPIMDBPIC2, NULL, 5000, NULL, 0); 425 425 free((*first)->thumb); 426 426 (*first)->thumb = ostrcat(TMPIMDBPIC2, NULL, 0, 0); -
titan/plugins/imdbapi/imdbapi.h
r19304 r19884 61 61 debug(133, "search: http://www.imdbapi.com/%s", tmpsearch); 62 62 63 tmpstr = gethttp("www.imdbapi.com", tmpsearch, 80, NULL, NULL, NULL, 0);63 tmpstr = gethttp("www.imdbapi.com", tmpsearch, 80, NULL, NULL, 5000, NULL, 0); 64 64 debug(133, "tmpsearch: %s", tmpsearch); 65 65 // debug(133, "tmpstr: %s", tmpstr); … … 121 121 122 122 if(!file_exist(savefile)) 123 gethttp(ip, path, 80, savefile, NULL, NULL, 0);123 gethttp(ip, path, 80, savefile, NULL, 5000, NULL, 0); 124 124 free((*first)->poster); 125 125 (*first)->poster = savefile; … … 153 153 else if(flag == 0) 154 154 { 155 gethttp(ip, path, 80, TMPIMDBAPIPIC, NULL, NULL, 0);155 gethttp(ip, path, 80, TMPIMDBAPIPIC, NULL, 5000, NULL, 0); 156 156 free((*first)->poster); 157 157 (*first)->poster = ostrcat(TMPIMDBAPIPIC, NULL, 0, 0); -
titan/plugins/lcdpearl1/lcd_weather.h
r19708 r19884 79 79 // tmpsearch = stringreplacechar(tmpsearch, ' ', '+'); 80 80 81 tmpstr = gethttp("weather.service.msn.com", tmpsearch, 80, NULL, NULL, NULL, 0);81 tmpstr = gethttp("weather.service.msn.com", tmpsearch, 80, NULL, NULL, 5000, NULL, 0); 82 82 83 83 free(tmpsearch); tmpsearch = NULL; -
titan/plugins/lcdsamsung/lcd_weather.h
r19150 r19884 79 79 // tmpsearch = stringreplacechar(tmpsearch, ' ', '+'); 80 80 81 tmpstr = gethttp("weather.service.msn.com", tmpsearch, 80, NULL, NULL, NULL, 0);81 tmpstr = gethttp("weather.service.msn.com", tmpsearch, 80, NULL, NULL, 5000, NULL, 0); 82 82 83 83 free(tmpsearch); tmpsearch = NULL; -
titan/plugins/news/news.h
r19468 r19884 123 123 124 124 //TODO: got language from titan.cfg 125 tmpstr = gethttp("www.google.com", "ig/api?news&hl=de", 80, NULL, NULL, NULL, 0);125 tmpstr = gethttp("www.google.com", "ig/api?news&hl=de", 80, NULL, NULL, 5000, NULL, 0); 126 126 127 127 if(tmpstr != NULL) -
titan/plugins/stock/stock.h
r19468 r19884 119 119 tmpsearch = stringreplacechar(tmpsearch, ' ', '+'); 120 120 121 tmpstr = gethttp("www.google.com", tmpsearch, 80, NULL, NULL, NULL, 0);121 tmpstr = gethttp("www.google.com", tmpsearch, 80, NULL, NULL, 5000, NULL, 0); 122 122 123 123 free(tmpsearch); tmpsearch = NULL; -
titan/plugins/tithek/beeg.h
r19879 r19884 17 17 } 18 18 19 tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);19 tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 20 20 if(getconfigint("debuglevel", NULL) == 99) 21 21 writesys("/tmp/beeg1_tmpstr", tmpstr, 0); -
titan/plugins/tithek/filenuke.h
r19879 r19884 34 34 debug(99, "test host only: %s", get_ip(host)); 35 35 debug(99, "tmpfile: %s", tmpfile); 36 tmpstr = gethttp(tmphost, tmpfile, 80, NULL, NULL, NULL, 0);36 tmpstr = gethttp(tmphost, tmpfile, 80, NULL, NULL, 10000, NULL, 0); 37 37 debug(99, "write file"); 38 38 sleep(2); -
titan/plugins/tithek/kinox.h
r19658 r19884 79 79 path = ostrcat("Search.html?q=", search, 0, 0); 80 80 81 tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);81 tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 82 82 tmpstr = string_resub("<div id=\"beep\" class=\"beep\"></div>", "</table>", tmpstr, 0); 83 83 … … 111 111 lang = ostrcat(lang, " (\?\?)", 1, 0); 112 112 113 tmpstr1 = gethttp("kinox.to", path, 80, NULL, NULL, NULL, 0);113 tmpstr1 = gethttp("kinox.to", path, 80, NULL, NULL, 10000, NULL, 0); 114 114 115 115 from = ostrcat("<div class=\"Grahpics\"><a href=\"", path, 0, 0); … … 195 195 } 196 196 197 tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);197 tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 198 198 199 199 if(tmpstr != NULL) … … 294 294 pathnew = ostrcat("/aGET/Mirror/", hlink, 0, 0); 295 295 296 tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, NULL, 0);296 tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0); 297 297 free(pathnew), pathnew = NULL; 298 298 … … 460 460 } 461 461 462 tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);462 tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 463 463 464 464 if(tmpstr != NULL) … … 479 479 480 480 free(tmpstr), tmpstr = NULL; 481 tmpstr = gethttp("kinox.to", pathnew, 80, NULL, NULL, NULL, 0);481 tmpstr = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0); 482 482 free(pathnew), pathnew = NULL; 483 483 … … 512 512 debug(99, "pathnew: %s", pathnew); 513 513 514 tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, NULL, 0);514 tmpstr1 = gethttp("kinox.to", pathnew, 80, NULL, NULL, 10000, NULL, 0); 515 515 tmpstr1 = string_replace_all("\\", "", tmpstr1, 1); 516 516 tmpstr1 = string_resub("<a href=\"", "\"", tmpstr1, 0); -
titan/plugins/tithek/myvideo.h
r19535 r19884 36 36 char* tmpstr = NULL; 37 37 // not working tmpstr hat zusatzdaten im string 38 tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);38 tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 39 39 /* 40 40 // work start … … 165 165 char* path = ostrcat("Videos_A-Z?searchWord=", search, 0, 0); 166 166 167 char* tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);167 char* tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 168 168 tmpstr = string_replace_all("<", "\n", tmpstr, 1); 169 169 tmpstr = string_replace_all(">", "\n", tmpstr, 1); -
titan/plugins/tithek/rtl2now.h
r18053 r19884 21 21 22 22 char* tmpstr = NULL; 23 tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);23 tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 24 24 25 25 if(flag == 1) -
titan/plugins/tithek/tithek.h
r19879 r19884 145 145 { 146 146 free(tmp); tmp = NULL; 147 tmp = gethttp(cmd, "/", 80, NULL, NULL, NULL, 0);147 tmp = gethttp(cmd, "/", 80, NULL, NULL, 10000, NULL, 0); 148 148 if(tmp != NULL) break; 149 149 } … … 356 356 { 357 357 free(tmp); tmp = NULL; 358 tmp = gethttp(cmd, "/", 80, NULL, NULL, NULL, 0);358 tmp = gethttp(cmd, "/", 80, NULL, NULL, 10000, NULL, 0); 359 359 if(tmp != NULL) break; 360 360 } … … 670 670 m_unlock(&status.tithekmutex, 20); 671 671 672 gethttpreal(node->host, node->page, node->port, node->filename, node->auth, NULL, 0, NULL, NULL, 20000, 0);672 gethttpreal(node->host, node->page, node->port, node->filename, node->auth, NULL, 0, NULL, NULL, node->timeout, 0); 673 673 674 674 if(tithekrun == 0) … … 714 714 char* tithekdownload(char* link, char* localname, char* pw, int pic, int flag) 715 715 { 716 int ret = 1, port = 80 ;716 int ret = 1, port = 80, timeout = 50000; 717 717 char* ip = NULL, *pos = NULL, *path = NULL; 718 718 char* tmpstr = NULL, *localfile = NULL; … … 773 773 { 774 774 if(tithekdownloadcount >= 24) //start max 24 threads 775 gethttp(ip, path, port, localfile, pw, NULL, 0);775 gethttp(ip, path, port, localfile, pw, timeout, NULL, 0); 776 776 else 777 777 { … … 787 787 dnode->connfd = -1; 788 788 dnode->ret = -1; 789 dnode->timeout = timeout; 789 790 addtimer(&tithekdownloadthread, START, 100, 1, (void*)dnode, NULL, NULL); 790 791 } … … 792 793 } 793 794 else 794 gethttp(ip, path, port, localfile, pw, NULL, 0);795 gethttp(ip, path, port, localfile, pw, timeout, NULL, 0); 795 796 } 796 797 } … … 802 803 803 804 if(localfile != NULL && ret == 1) 804 screendownload("Download", ip, path, port, localfile, pw, 0);805 screendownload("Download", ip, path, port, localfile, pw, timeout, 0); 805 806 } 806 807 … … 1071 1072 dnode->connfd = -1; 1072 1073 dnode->ret = -1; 1074 dnode->timeout = 500000; 1073 1075 1074 1076 addtimer(&gethttpstruct, START, 1000, 1, (void*)dnode, NULL, NULL); -
titan/plugins/tithek/youtube.h
r19794 r19884 19 19 } 20 20 21 tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);21 tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 22 22 if(flag == 1) 23 23 { … … 170 170 path = ostrcat(path, "&max-results=50", 1, 0); 171 171 172 char* tmpstr = gethttp(ip, path, 80, NULL, NULL, NULL, 0);172 char* tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 173 173 tmpstr = string_replace_all("media:thumbnail", "\nthumbnail", tmpstr, 1); 174 174 … … 194 194 ip = ostrcat("www.youtube.com", NULL, 0, 0); 195 195 path = ostrcat("watch?v=", id, 0, 0); 196 title = gethttp(ip, path, 80, NULL, NULL, NULL, 0);196 title = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0); 197 197 title = string_resub("<meta name=\"title\" content=\"", "\">", title, 0); 198 198 -
titan/plugins/tmdb/tmdb.h
r19859 r19884 154 154 savefile = ostrcat(savefile, pic, 1, 0); 155 155 if(!file_exist(savefile)) 156 gethttp(ip, path, 80, savefile, NULL, NULL, 0);156 gethttp(ip, path, 80, savefile, NULL, 5000, NULL, 0); 157 157 ret = savefile; 158 158 } 159 159 else 160 160 { 161 gethttp(ip, path, 80, tmppic, NULL, NULL, 0);161 gethttp(ip, path, 80, tmppic, NULL, 5000, NULL, 0); 162 162 ret = ostrcat(tmppic, NULL, 0, 0); 163 163 } … … 207 207 208 208 debug(133, "search: http://api.themoviedb.org/%s", tmpsearch); 209 tmpstr = gethttp("api.themoviedb.org", tmpsearch, 80, NULL, NULL, NULL, 0);209 tmpstr = gethttp("api.themoviedb.org", tmpsearch, 80, NULL, NULL, 5000, NULL, 0); 210 210 211 211 debug(133, "tmpsearch: %s", tmpsearch); -
titan/plugins/weather/weather.h
r19468 r19884 140 140 //tmpsearch = stringreplacechar(tmpsearch, ' ', '+'); 141 141 142 tmpstr = gethttp("weather.service.msn.com", tmpsearch, 80, NULL, NULL, NULL, 0);143 //tmpstr = gethttp("www.google.com", tmpsearch, 80, NULL, NULL, NULL, 0);142 tmpstr = gethttp("weather.service.msn.com", tmpsearch, 80, NULL, NULL, 5000, NULL, 0); 143 //tmpstr = gethttp("www.google.com", tmpsearch, 80, NULL, NULL, 5000, NULL, 0); 144 144 145 145 free(tmpsearch); tmpsearch = NULL; -
titan/titan/download.h
r19553 r19884 2 2 #define DOWNLOAD_H 3 3 4 int screendownload(char* title, char* host, char* page, int port, char* filename, char* auth, int flag)4 int screendownload(char* title, char* host, char* page, int port, char* filename, char* auth, int timeout, int flag) 5 5 { 6 6 debug(1000, "in"); … … 60 60 dnode->connfd = -1; 61 61 dnode->ret = -1; 62 dnode->timeout = timeout; 62 63 63 64 addtimer(&gethttpstruct, START, 1000, 1, (void*)dnode, NULL, NULL); -
titan/titan/global.h
r19839 r19884 56 56 { 57 57 free(tmp); tmp = NULL; 58 tmp = gethttp(cmd, "/", 80, NULL, NULL, NULL, 0);58 tmp = gethttp(cmd, "/", 80, NULL, NULL, 5000, NULL, 0); 59 59 if(tmp != NULL) break; 60 60 } … … 1045 1045 { 1046 1046 char* blackfile = NULL; 1047 blackfile = gethttp("atemio.dyndns.tv", "/svn/auth/blacklist", 80, NULL, HTTPAUTH, NULL, 0);1047 blackfile = gethttp("atemio.dyndns.tv", "/svn/auth/blacklist", 80, NULL, HTTPAUTH, 5000, NULL, 0); 1048 1048 1049 1049 count = 0; -
titan/titan/header.h
r19843 r19884 165 165 166 166 //sock.h 167 char* gethttp(char* host, char* page, int port, char* filename, char* auth, struct download* dnode, int redirect);167 char* gethttp(char* host, char* page, int port, char* filename, char* auth, int timeout, struct download* dnode, int redirect); 168 168 char *get_ip(char *host); 169 169 int sockportopen(int *fd, char* ip, int port, int tout); … … 292 292 293 293 //download.h 294 int screendownload(char* title, char* host, char* page, int port, char* filename, char* auth, int flag);294 int screendownload(char* title, char* host, char* page, int port, char* filename, char* auth, int timeout, int flag); 295 295 296 296 // epgrecord.h -
titan/titan/info.h
r18617 r19884 71 71 path = ostrcat(path, boxversion, 1, 0); 72 72 path = ostrcat(path, ".titan", 1, 0); 73 tmpstr = gethttp("atemio.dyndns.tv", path, 80, NULL, HTTPAUTH, NULL, 0);73 tmpstr = gethttp("atemio.dyndns.tv", path, 80, NULL, HTTPAUTH, 5000, NULL, 0); 74 74 free(path), path = NULL; 75 75 free(boxversion), boxversion = NULL; … … 84 84 char* out = NULL; 85 85 path = ostrcat(path, "/svn/image-beta/changelog.git", 1, 0); 86 tmpstr = gethttp("atemio.dyndns.tv", path, 80, NULL, HTTPAUTH, NULL, 0);86 tmpstr = gethttp("atemio.dyndns.tv", path, 80, NULL, HTTPAUTH, 5000, NULL, 0); 87 87 free(path), path = NULL; 88 88 out = readfromlinetoline(tmpstr, 0, 500, 1); -
titan/titan/ipkg.h
r17650 r19884 378 378 tmppath = ostrcat(tmppath, path, 1, 0); 379 379 tmppath = string_replace("Packages.gz", "Packages.preview.tar.gz", tmppath, 1); 380 gethttp(ip, tmppath, 80, "/tmp/Packages.preview.tar.gz", HTTPAUTH, NULL, 0);380 gethttp(ip, tmppath, 80, "/tmp/Packages.preview.tar.gz", HTTPAUTH, 5000, NULL, 0); 381 381 free(tmppath); tmppath = NULL; 382 382 … … 387 387 388 388 free(checkfile); checkfile = NULL; 389 gethttp(ip, path, 80, (char*)filename, HTTPAUTH, NULL, 0);389 gethttp(ip, path, 80, (char*)filename, HTTPAUTH, 5000, NULL, 0); 390 390 } 391 391 else -
titan/titan/newsletter.h
r19495 r19884 99 99 100 100 unlink(newsletterfile); 101 gethttp("atemio.dyndns.tv", "/mediathek/newsletter.txt", 80, newsletterfile, HTTPAUTH, NULL, 0);101 gethttp("atemio.dyndns.tv", "/mediathek/newsletter.txt", 80, newsletterfile, HTTPAUTH, 5000, NULL, 0); 102 102 103 103 fileline = malloc(MINMALLOC); -
titan/titan/sock.h
r19839 r19884 781 781 } 782 782 783 char* gethttp(char* host, char* page, int port, char* filename, char* auth, struct download* dnode, int redirect)784 { 785 return gethttpreal(host, page, port, filename, auth, dnode, redirect, NULL, NULL, 5000, 0);783 char* gethttp(char* host, char* page, int port, char* filename, char* auth, int timeout, struct download* dnode, int redirect) 784 { 785 return gethttpreal(host, page, port, filename, auth, dnode, redirect, NULL, NULL, timeout, 0); 786 786 } 787 787 … … 789 789 { 790 790 if(node != NULL) 791 gethttp(node->host, node->page, node->port, node->filename, node->auth, node , 0);791 gethttp(node->host, node->page, node->port, node->filename, node->auth, node->timeout, node, 0); 792 792 } 793 793 -
titan/titan/struct.h
r19869 r19884 553 553 unsigned int aktkb; 554 554 int ret; 555 int timeout; 555 556 }; 556 557
Note: See TracChangeset
for help on using the changeset viewer.