Ignore:
Timestamp:
10/12/13 15:06:29 (10 years ago)
Author:
nit
Message:

optimize

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tithek/flashx.h

    r19881 r24236  
    55{
    66        debug(99, "in host: %s file: %s", host, file);
     7        int debuglevel = getconfigint("debuglevel", NULL);
    78        char* tmphost = NULL;
    89        char* tmpfile = NULL;
     
    3435        tmpstr = gethttpreal(tmphost, tmpfile, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 1);
    3536
    36         if(getconfigint("debuglevel", NULL) == 99)
    37                 writesys("/tmp/flashx1_tmpstr_get1", tmpstr, 0);
     37  titheklog(debuglevel, "/tmp/flashx1_tmpstr_get1", NULL, tmpstr);
    3838
    3939        free(tmpstr); tmpstr = NULL;
     
    5151        tmpstr = gethttpreal(tmphost, tmpfile, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 1);
    5252
    53         if(getconfigint("debuglevel", NULL) == 99)
    54                 writesys("/tmp/flashx2_tmpstr_get2", tmpstr, 0);
     53  titheklog(debuglevel, "/tmp/flashx2_tmpstr_get2", NULL, tmpstr);
    5554
    5655        free(tmpstr); tmpstr = NULL;
     
    7271        }
    7372
    74         if(getconfigint("debuglevel", NULL) == 99)
    75                 system("cp -a /tmp/tithek/x9 /tmp/flashx3_tmpstr_get3");
     73  if(debuglevel == 99) system("cp -a /tmp/tithek/x9 /tmp/flashx3_tmpstr_get3");
    7674
    7775        free(send); send = NULL;
    7876        tmpstr = command("cat /tmp/tithek/x9 | sed '1,1d' | zcat");
    7977
    80         if(getconfigint("debuglevel", NULL) == 99)
    81                 writesys("/tmp/flashx4_tmpstr_get3_zcat", tmpstr, 0);
     78  titheklog(debuglevel, "/tmp/flashx4_tmpstr_get3_zcat", NULL, tmpstr);
    8279
    8380        streamlink = string_resub("<file>", "</file>", tmpstr, 0);
    84         if(getconfigint("debuglevel", NULL) == 99)
    85                 writesys("/tmp/flashx5_streamlink", streamlink, 0);
     81        titheklog(debuglevel, "/tmp/flashx5_streamlink", NULL, streamlink);
    8682
    8783end:
Note: See TracChangeset for help on using the changeset viewer.