]>
Commit | Line | Data |
---|---|---|
c9285609 | 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 @@ | |
75c8dbd3 TP |
4 | { |
5 | char configfile[PATH_MAX + 1]; | |
6 | char *envpath; | |
22133c47 | 7 | + char *home_etc; |
75c8dbd3 | 8 | GSM_Error error; |
c9285609 | 9 | #if defined(HAVE_GETPWUID) && defined(HAVE_GETUID) |
10 | struct passwd *pwent; | |
11 | @@ -1126,6 +1127,16 @@ | |
12 | } | |
13 | } | |
c66455df | 14 | |
c9285609 | 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 { | |
75c8dbd3 | 24 | + |
c9285609 | 25 | /* Try home from environment */ |
11c79f69 | 26 | envpath = getenv("HOME"); |
27 | if (envpath) { | |
c9285609 | 28 | @@ -1135,6 +1146,7 @@ |
75c8dbd3 TP |
29 | error = GSM_TryReadGammuRC(configfile, result); |
30 | if (error == ERR_NONE) return ERR_NONE; | |
75c8dbd3 | 31 | } |
11c79f69 | 32 | + } |
75c8dbd3 | 33 | |
c9285609 | 34 | #if defined(HAVE_GETPWUID) && defined(HAVE_GETUID) |
35 | /* Tru home from passwd */ |