]> git.pld-linux.org Git - packages/gammu.git/blame - gammu-etc_dir.patch
- up to 2.5.0
[packages/gammu.git] / gammu-etc_dir.patch
CommitLineData
11c79f69 1diff -burNp gammu-1.23.1/libgammu/gsmstate.c gammu-1.23.1-dud/libgammu/gsmstate.c
2--- gammu-1.23.1/libgammu/gsmstate.c 2009-02-12 15:05:40.000000000 +0100
3+++ gammu-1.23.1-dud/libgammu/gsmstate.c 2009-03-14 21:19:03.565653553 +0100
4@@ -1021,6 +1021,7 @@ GSM_Error GSM_FindGammuRC (INI_Section *
75c8dbd3
TP
5 {
6 char configfile[PATH_MAX + 1];
7 char *envpath;
22133c47 8+ char *home_etc;
75c8dbd3 9 GSM_Error error;
c66455df 10
75c8dbd3 11 *result = NULL;
11c79f69 12@@ -1042,6 +1043,15 @@ GSM_Error GSM_FindGammuRC (INI_Section *
75c8dbd3
TP
13 /* Reset as we're using strcat */
14 configfile[0] = 0;
95bc37a0 15
11c79f69 16+ /* Try user etc dir */
17+ home_etc = getenv("HOME_ETC");
18+ if (home_etc) {
19+ strcat(configfile, home_etc);
20+ strcat(configfile, GAMMURC_NAME);
75c8dbd3 21+
11c79f69 22+ error = GSM_TryReadGammuRC(configfile, result);
23+ if (error == ERR_NONE) return ERR_NONE;
24+ } else {
75c8dbd3 25 /* Try user home */
11c79f69 26 envpath = getenv("HOME");
27 if (envpath) {
28@@ -1051,6 +1061,7 @@ GSM_Error GSM_FindGammuRC (INI_Section *
75c8dbd3
TP
29 error = GSM_TryReadGammuRC(configfile, result);
30 if (error == ERR_NONE) return ERR_NONE;
75c8dbd3 31 }
11c79f69 32+ }
75c8dbd3
TP
33
34 #if defined(WIN32)
11c79f69 35 /* Reset as we're using strcat */
This page took 0.157662 seconds and 4 git commands to generate.