Don't stat() on iPhone/iPod.
Grzegorz Dymarek noted that tinc segfaults at the stat() call in execute_script() on the iPhone. We can omit the stat() call for the moment, the subsequent call to system() will fail with just a warning.
This commit is contained in:
parent
4a5d42178c
commit
a60a0a1f13
1 changed files with 2 additions and 0 deletions
|
@ -380,12 +380,14 @@ bool execute_script(const char *name, char **envp)
|
||||||
|
|
||||||
scriptname[len - 1] = '\0';
|
scriptname[len - 1] = '\0';
|
||||||
|
|
||||||
|
#ifndef HAVE_TUNEMU
|
||||||
/* First check if there is a script */
|
/* First check if there is a script */
|
||||||
|
|
||||||
if(stat(scriptname + 1, &s)) {
|
if(stat(scriptname + 1, &s)) {
|
||||||
free(scriptname);
|
free(scriptname);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ifdebug(STATUS) logger(LOG_INFO, _("Executing script %s"), name);
|
ifdebug(STATUS) logger(LOG_INFO, _("Executing script %s"), name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue