[Pcsclite-cvs-commit] r2642 - in /trunk/PCSC/src: pcscdaemon.c utils.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Thu Oct 11 09:28:21 UTC 2007


Author: rousseau
Date: Thu Oct 11 09:28:20 2007
New Revision: 2642

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2642
Log:
use PCSCLITE_RUN_PID instead of USE_RUN_PID

Modified:
    trunk/PCSC/src/pcscdaemon.c
    trunk/PCSC/src/utils.c

Modified: trunk/PCSC/src/pcscdaemon.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/pcscdaemon.c?rev=2642&op=diff
==============================================================================
--- trunk/PCSC/src/pcscdaemon.c (original)
+++ trunk/PCSC/src/pcscdaemon.c Thu Oct 11 09:28:20 2007
@@ -374,7 +374,7 @@
 		{
 			if (HotPlug)
 			{
-				Log1(PCSC_LOG_CRITICAL, "file " USE_RUN_PID " do not exist");
+				Log1(PCSC_LOG_CRITICAL, "file " PCSCLITE_RUN_PID " do not exist");
 				Log1(PCSC_LOG_CRITICAL, "Hotplug failed");
 				return EXIT_FAILURE;
 			}
@@ -384,7 +384,7 @@
 			Log1(PCSC_LOG_CRITICAL,
 				"Maybe another pcscd is running?");
 			Log1(PCSC_LOG_CRITICAL,
-				"I can't read process pid from " USE_RUN_PID);
+				"I can't read process pid from " PCSCLITE_RUN_PID);
 			Log1(PCSC_LOG_CRITICAL,
 				"Remove " PCSCLITE_PUBSHM_FILE " and " PCSCLITE_CSOCK_NAME);
 			Log1(PCSC_LOG_CRITICAL,
@@ -424,7 +424,7 @@
 	{
 		int f;
 
-		if ((f = SYS_OpenFile(USE_RUN_PID, O_RDWR | O_CREAT, 00644)) != -1)
+		if ((f = SYS_OpenFile(PCSCLITE_RUN_PID, O_RDWR | O_CREAT, 00644)) != -1)
 		{
 			char pid[PID_ASCII_SIZE];
 
@@ -434,10 +434,10 @@
 
 			/* set mode so that the file is world readable.
 			 * The file is used by libpcsclite */
-			SYS_Chmod(USE_RUN_PID, 0644);
+			SYS_Chmod(PCSCLITE_RUN_PID, 0644);
 		}
 		else
-			Log2(PCSC_LOG_CRITICAL, "cannot create " USE_RUN_PID ": %s",
+			Log2(PCSC_LOG_CRITICAL, "cannot create " PCSCLITE_RUN_PID ": %s",
 				strerror(errno));
 	}
 
@@ -550,9 +550,9 @@
 		Log2(PCSC_LOG_ERROR, "Cannot unlink " PCSCLITE_CSOCK_NAME ": %s",
 			strerror(errno));
 
-	rv = SYS_Unlink(USE_RUN_PID);
+	rv = SYS_Unlink(PCSCLITE_RUN_PID);
 	if (rv != 0)
-		Log2(PCSC_LOG_ERROR, "Cannot unlink " USE_RUN_PID ": %s",
+		Log2(PCSC_LOG_ERROR, "Cannot unlink " PCSCLITE_RUN_PID ": %s",
 			strerror(errno));
 }
 

Modified: trunk/PCSC/src/utils.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/utils.c?rev=2642&op=diff
==============================================================================
--- trunk/PCSC/src/utils.c (original)
+++ trunk/PCSC/src/utils.c Thu Oct 11 09:28:20 2007
@@ -22,6 +22,7 @@
 #include "debug.h"
 #include "config.h"
 #include "utils.h"
+#include "pcscd.h"
 
 pid_t GetDaemonPid(void)
 {
@@ -31,7 +32,7 @@
 	/* pids are only 15 bits but 4294967296
 	 * (32 bits in case of a new system use it) is on 10 bytes
 	 */
-	if ((f = fopen(USE_RUN_PID, "rb")) != NULL)
+	if ((f = fopen(PCSCLITE_RUN_PID, "rb")) != NULL)
 	{
 		char pid_ascii[PID_ASCII_SIZE];
 
@@ -42,7 +43,7 @@
 	}
 	else
 	{
-		Log2(PCSC_LOG_CRITICAL, "Can't open " USE_RUN_PID ": %s",
+		Log2(PCSC_LOG_CRITICAL, "Can't open " PCSCLITE_RUN_PID ": %s",
 			strerror(errno));
 		return -1;
 	}




More information about the Pcsclite-cvs-commit mailing list