]>
Commit | Line | Data |
---|---|---|
1 | --- gammu-1.28.92/libgammu/gsmstate.c~ 2010-10-04 15:28:55.000000000 +0200 | |
2 | +++ gammu-1.28.92/libgammu/gsmstate.c 2010-10-05 11:15:22.047837669 +0200 | |
3 | @@ -1085,6 +1085,7 @@ | |
4 | { | |
5 | char configfile[PATH_MAX + 1]; | |
6 | char *envpath; | |
7 | + char *home_etc; | |
8 | GSM_Error error; | |
9 | #if defined(HAVE_GETPWUID) && defined(HAVE_GETUID) | |
10 | struct passwd *pwent; | |
11 | @@ -1126,6 +1127,16 @@ | |
12 | } | |
13 | } | |
14 | ||
15 | + /* Try user etc dir */ | |
16 | + home_etc = getenv("HOME_ETC"); | |
17 | + if (home_etc) { | |
18 | + strcat(configfile, home_etc); | |
19 | + strcat(configfile, GAMMURC_NAME); | |
20 | + | |
21 | + error = GSM_TryReadGammuRC(configfile, result); | |
22 | + if (error == ERR_NONE) return ERR_NONE; | |
23 | + } else { | |
24 | + | |
25 | /* Try home from environment */ | |
26 | envpath = getenv("HOME"); | |
27 | if (envpath) { | |
28 | @@ -1135,6 +1146,7 @@ | |
29 | error = GSM_TryReadGammuRC(configfile, result); | |
30 | if (error == ERR_NONE) return ERR_NONE; | |
31 | } | |
32 | + } | |
33 | ||
34 | #if defined(HAVE_GETPWUID) && defined(HAVE_GETUID) | |
35 | /* Tru home from passwd */ |