[pkg-dspam-commits] r67 - trunk/debian/patches
Matthijs Mohlmann
active2-guest at costa.debian.org
Fri Jan 13 21:43:20 UTC 2006
Author: active2-guest
Date: Fri Jan 13 21:43:20 2006
New Revision: 67
Modified:
trunk/debian/patches/add-config-dir.dpatch
Log:
* Now display the file in the error message where the error on occur. (Don't
know if this is right english.. but whatever...)
Modified: trunk/debian/patches/add-config-dir.dpatch
==============================================================================
--- trunk/debian/patches/add-config-dir.dpatch (original)
+++ trunk/debian/patches/add-config-dir.dpatch Fri Jan 13 21:43:20 2006
@@ -6,8 +6,8 @@
@DPATCH@
diff -urNad dspam-3.6.2~/src/read_config.c dspam-3.6.2/src/read_config.c
---- dspam-3.6.2~/src/read_config.c 2006-01-13 19:51:46.000000000 +0100
-+++ dspam-3.6.2/src/read_config.c 2006-01-13 19:53:12.136133750 +0100
+--- dspam-3.6.2~/src/read_config.c 2006-01-13 22:21:17.000000000 +0100
++++ dspam-3.6.2/src/read_config.c 2006-01-13 22:24:08.854628500 +0100
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <errno.h>
@@ -26,7 +26,7 @@
static char *next_normal_token(char **p)
{
char *start = *p;
-@@ -93,19 +97,53 @@
+@@ -93,28 +97,66 @@
return NULL;
}
@@ -89,18 +89,23 @@
if (path == NULL)
file = fopen(CONFIG_DEFAULT, "r");
else
-@@ -113,8 +151,8 @@
+ file = fopen(path, "r");
if (file == NULL) {
- LOG(LOG_ERR, ERR_IO_FILE_OPEN, CONFIG_DEFAULT, strerror(errno));
+- LOG(LOG_ERR, ERR_IO_FILE_OPEN, CONFIG_DEFAULT, strerror(errno));
- free(attrib);
- return NULL;
++ if (path == NULL) {
++ LOG(LOG_ERR, ERR_IO_FILE_OPEN, CONFIG_DEFAULT, strerror(errno));
++ } else {
++ LOG(LOG_ERR, ERR_IO_FILE_OPEN, path, strerror(errno));
++ }
+ free(*attrib);
+ return 0;
}
while(fgets(buffer, sizeof(buffer), file)!=NULL) {
-@@ -130,30 +168,48 @@
+@@ -130,30 +172,48 @@
continue; /* Ignore whitespace-only lines */
while ((v = tokenize(NULL, &bufptr)) != NULL) {
More information about the Pkg-dspam-commits
mailing list