git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@986 77e5149b-7576-45b1-b177-96237e5ba77b
| ... | ... |
@@ -1,3 +1,7 @@ |
| 1 |
+Sun Oct 10 12:11:31 BST 2004 (njh) |
|
| 2 |
+---------------------------------- |
|
| 3 |
+ * libclamav/mbox.c: Replace (commented out) perror calls with cli_errmsg |
|
| 4 |
+ |
|
| 1 | 5 |
Sun Oct 10 01:12:04 CEST 2004 (tk) |
| 2 | 6 |
---------------------------------- |
| 3 | 7 |
* configure: check libcurl's version number |
| ... | ... |
@@ -17,6 +17,9 @@ |
| 17 | 17 |
* |
| 18 | 18 |
* Change History: |
| 19 | 19 |
* $Log: mbox.c,v $ |
| 20 |
+ * Revision 1.151 2004/10/10 11:10:20 nigelhorne |
|
| 21 |
+ * Remove perror - replace with cli_errmsg |
|
| 22 |
+ * |
|
| 20 | 23 |
* Revision 1.150 2004/10/09 08:01:37 nigelhorne |
| 21 | 24 |
* Needs libcurl >= 7.11 |
| 22 | 25 |
* |
| ... | ... |
@@ -438,7 +441,7 @@ |
| 438 | 438 |
* Compilable under SCO; removed duplicate code with message.c |
| 439 | 439 |
* |
| 440 | 440 |
*/ |
| 441 |
-static char const rcsid[] = "$Id: mbox.c,v 1.150 2004/10/09 08:01:37 nigelhorne Exp $"; |
|
| 441 |
+static char const rcsid[] = "$Id: mbox.c,v 1.151 2004/10/10 11:10:20 nigelhorne Exp $"; |
|
| 442 | 442 |
|
| 443 | 443 |
#if HAVE_CONFIG_H |
| 444 | 444 |
#include "clamav-config.h" |
| ... | ... |
@@ -551,7 +554,7 @@ typedef enum { FALSE = 0, TRUE = 1 } bool;
|
| 551 | 551 |
#undef WITH_CURL /* also undef FOLLOWURLS? */ |
| 552 | 552 |
#endif |
| 553 | 553 |
|
| 554 |
-#if (LIBCURL_VERSION_MAJOR == 7) && (LIBCURL_VERSION_MINOR < 11) |
|
| 554 |
+#if (LIBCURL_VERSION_MAJOR == 7) && (LIBCURL_VERSION_MINOR < 10) |
|
| 555 | 555 |
#undef WITH_CURL /* also undef FOLLOWURLS? */ |
| 556 | 556 |
#endif |
| 557 | 557 |
|
| ... | ... |
@@ -2635,7 +2638,7 @@ rfc1341(message *m, const char *dir) |
| 2635 | 2635 |
char *oldfilename; |
| 2636 | 2636 |
|
| 2637 | 2637 |
if((mkdir(PARTIAL_DIR, 0700) < 0) && (errno != EEXIST)) {
|
| 2638 |
- /*perror(PARTIAL_DIR);*/ |
|
| 2638 |
+ cli_errmsg("Can't create the directory '%s'", PARTIAL_DIR);
|
|
| 2639 | 2639 |
return -1; |
| 2640 | 2640 |
} |
| 2641 | 2641 |
|
| ... | ... |
@@ -2683,6 +2686,7 @@ rfc1341(message *m, const char *dir) |
| 2683 | 2683 |
|
| 2684 | 2684 |
/* |
| 2685 | 2685 |
* If it's the last one - reassemble it |
| 2686 |
+ * FIXME: this assumes that we receive the parts in order |
|
| 2686 | 2687 |
*/ |
| 2687 | 2688 |
if((n == t) && ((dd = opendir(PARTIAL_DIR)) != NULL)) {
|
| 2688 | 2689 |
FILE *fout; |
| ... | ... |
@@ -2694,7 +2698,7 @@ rfc1341(message *m, const char *dir) |
| 2694 | 2694 |
|
| 2695 | 2695 |
fout = fopen(outname, "wb"); |
| 2696 | 2696 |
if(fout == NULL) {
|
| 2697 |
- /*perror(outname);*/ |
|
| 2697 |
+ cli_errmsg("Can't open '%s' for writing", outname);
|
|
| 2698 | 2698 |
free(id); |
| 2699 | 2699 |
free(total); |
| 2700 | 2700 |
free(number); |
| ... | ... |
@@ -2727,7 +2731,7 @@ rfc1341(message *m, const char *dir) |
| 2727 | 2727 |
sprintf(fullname, "%s/%s", PARTIAL_DIR, dent->d_name); |
| 2728 | 2728 |
fin = fopen(fullname, "rb"); |
| 2729 | 2729 |
if(fin == NULL) {
|
| 2730 |
- /*perror(fullname);*/ |
|
| 2730 |
+ cli_errmsg("Can't open '%s' for reading", fullname);
|
|
| 2731 | 2731 |
fclose(fout); |
| 2732 | 2732 |
unlink(outname); |
| 2733 | 2733 |
free(id); |
| ... | ... |
@@ -2970,7 +2974,7 @@ getURL(struct arg *arg) |
| 2970 | 2970 |
fp = fopen(fout, "w"); |
| 2971 | 2971 |
|
| 2972 | 2972 |
if(fp == NULL) {
|
| 2973 |
- /*perror(fout);*/ |
|
| 2973 |
+ cli_errmsg("Can't open '%s' for writing", fout);
|
|
| 2974 | 2974 |
free(fout); |
| 2975 | 2975 |
curl_easy_cleanup(curl); |
| 2976 | 2976 |
return NULL; |