diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -47,9 +47,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |||
| 47 | #include "device.h" | 47 | #include "device.h" |
| 48 | #include "client.h" | 48 | #include "client.h" |
| 49 | 49 | ||
| 50 | extern const char* userpref_get_config_dir(); | ||
| 51 | |||
| 50 | static const char *socket_path = "/var/run/usbmuxd"; | 52 | static const char *socket_path = "/var/run/usbmuxd"; |
| 51 | static const char *lockfile = "/var/run/usbmuxd.pid"; | 53 | static const char *lockfile = "/var/run/usbmuxd.pid"; |
| 52 | static const char *userprefdir = "/var/lib/lockdown"; | ||
| 53 | 54 | ||
| 54 | int should_exit; | 55 | int should_exit; |
| 55 | int should_discover; | 56 | int should_discover; |
| @@ -529,6 +530,8 @@ int main(int argc, char *argv[]) | |||
| 529 | if(listenfd < 0) | 530 | if(listenfd < 0) |
| 530 | goto terminate; | 531 | goto terminate; |
| 531 | 532 | ||
| 533 | const char* userprefdir = userpref_get_config_dir(); | ||
| 534 | |||
| 532 | struct stat fst; | 535 | struct stat fst; |
| 533 | int userprefdir_created = 0; | 536 | int userprefdir_created = 0; |
| 534 | if (stat(userprefdir, &fst) < 0) { | 537 | if (stat(userprefdir, &fst) < 0) { |
