Changeset 45407 for titan


Ignore:
Timestamp:
02/15/21 04:08:38 (3 years ago)
Author:
obi
Message:

fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/satipclient/satipclient.h

    r45406 r45407  
    77        struct skin* satipclient = getscreen("satipclientsettings");
    88        struct skin* listbox = getscreennode(satipclient, "listbox");
    9         char* tmpstr = NULL, *satipclientstop = NULL, *satipclientstart = NULL, *satipclientscan = NULL, *cmd = NULL;
     9        char* tmpstr = NULL, *satipclientstop = NULL, *satipclientstart = NULL, *satipclientscan = NULL, *satipclientrun = NULL, *cmd = NULL;
    1010        struct skin* tmp = NULL;
    1111        struct skin* node = NULL;
     
    1414        satipclientstart = ostrcat("/etc/init.d/satipclient start", NULL, 0, 0);
    1515        satipclientscan = ostrcat(createpluginpath("/satipclient/files/scan.py", 0), NULL, 0, 0);
    16         cmd = ostrcat(createpluginpath("/satipclient/files/run.sh", 0), " ", 0, 0);
    17         cmd = ostrcat(cmd, satipclientscan, 1, 0);
     16        satipclientrun = ostrcat(createpluginpath("/satipclient/files/run.sh", 0), NULL, 0, 0);
    1817
    1918        addscreenrc(satipclient, listbox);
     
    8180                else if(rcret == getrcconfigint("rcyellow", NULL))
    8281                {
     82                        cmd = ostrcat(satipclientrun, " ", 0, 0);
     83                        cmd = ostrcat(cmd, satipclientscan, 1, 0);
    8384                        debug(10, "cmd: %s", cmd);
    8485                        tmpstr = command(cmd);
     86                        free(cmd), cmd = NULL;
    8587
    8688                        debug(10, "tmpstr: %s", tmpstr);
     
    100102        free(satipclientstop), satipclientstop = NULL;
    101103        free(satipclientscan), satipclientscan = NULL;
    102         free(cmd), cmd = NULL;
    103104
    104105        delownconfigtmpall();
Note: See TracChangeset for help on using the changeset viewer.