]> git.pld-linux.org Git - packages/gammu.git/blob - gammu-etc_dir.patch
- gammu-smsd subpackage
[packages/gammu.git] / gammu-etc_dir.patch
1 diff -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 *
5  {
6         char configfile[PATH_MAX + 1];
7         char *envpath;
8 +       char *home_etc;
9         GSM_Error error;
10  
11         *result = NULL;
12 @@ -1042,6 +1043,15 @@ GSM_Error GSM_FindGammuRC (INI_Section *
13         /* Reset as we're using strcat */
14         configfile[0] = 0;
15  
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);
21 +
22 +                error = GSM_TryReadGammuRC(configfile, result);
23 +                if (error == ERR_NONE) return ERR_NONE;
24 +        } else {
25         /* Try user home */
26         envpath  = getenv("HOME");
27         if (envpath) {
28 @@ -1051,6 +1061,7 @@ GSM_Error GSM_FindGammuRC (INI_Section *
29                 error = GSM_TryReadGammuRC(configfile, result);
30                 if (error == ERR_NONE) return ERR_NONE;
31         }
32 +       }
33  
34  #if defined(WIN32)
35         /* Reset as we're using strcat */
This page took 0.096798 seconds and 3 git commands to generate.