]> git.pld-linux.org Git - packages/dctc.git/commitdiff
- home_etc patch
authorpascalek <pascalek@pld-linux.org>
Mon, 3 Jun 2002 09:18:32 +0000 (09:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dctc-home_etc.patch -> 1.1

dctc-home_etc.patch [new file with mode: 0644]

diff --git a/dctc-home_etc.patch b/dctc-home_etc.patch
new file mode 100644 (file)
index 0000000..5cb6c2e
--- /dev/null
@@ -0,0 +1,46 @@
+diff -Nur dctc-0.82.0.orig/src/dc_com.c dctc-0.82.0.chng/src/dc_com.c
+--- dctc-0.82.0.orig/src/dc_com.c      Wed Apr  3 15:26:36 2002
++++ dctc-0.82.0.chng/src/dc_com.c      Mon Jun  3 09:35:10 2002
+@@ -203,8 +203,17 @@
+                       char *path;
+                       path=getenv("HOME");
+-                      running_dir=g_string_new((path!=NULL)?path:".");
+-                      running_dir=g_string_append(running_dir,"/.dctc/running/");
++                      if (!path)
++                          path = ".";
++    
++                      if(getenv("CONFIG_DIR"))
++                          path = g_strconcat(path, "/", getenv("CONFIG_DIR"), 
++                              "/dctc/running/", NULL);
++                      else
++                          path = g_strconcat(path, "/.dctc/running/", NULL);
++
++                      running_dir=g_string_new(path);
++                      g_free(path);
+               }
+               /* fill the running_dctc array with the path to UDP socket of all running dctc */
+diff -Nur dctc-0.82.0.orig/src/main.c dctc-0.82.0.chng/src/main.c
+--- dctc-0.82.0.orig/src/main.c        Fri May 24 17:59:11 2002
++++ dctc-0.82.0.chng/src/main.c        Mon Jun  3 11:06:13 2002
+@@ -1603,8 +1603,17 @@
+               struct stat st;
+               path=getenv("HOME");
+-              local_dctc_sock_path=g_string_new(NULL);
+-              g_string_sprintf(local_dctc_sock_path,"%s/.dctc",(path!=NULL)?path:".");
++              if (!path)
++                  path = ".";
++    
++              if(getenv("CONFIG_DIR"))
++                  path = g_strconcat(path, "/", getenv("CONFIG_DIR"), "/dctc", NULL);
++              else
++                  path = g_strconcat(path, "/.dctc", NULL);
++                  
++              
++              local_dctc_sock_path=g_string_new(path);
++              g_free(path);
+               if(stat(local_dctc_sock_path->str,&st))
+               {
This page took 0.082548 seconds and 4 git commands to generate.