mbox already fmapified, just drop descriptor

This commit is contained in:
Török Edvin
2011-06-10 20:17:19 +03:00
parent 3f065bbe02
commit 2df29bde34
3 changed files with 9 additions and 9 deletions

View File

@@ -186,7 +186,7 @@ typedef struct mbox_ctx {
#define UNLOCKFILE(fp)
#endif
static int cli_parse_mbox(const char *dir, int desc, cli_ctx *ctx);
static int cli_parse_mbox(const char *dir, cli_ctx *ctx);
static message *parseEmailFile(fmap_t *map, size_t *at, const table_t *rfc821Table, const char *firstLine, const char *dir);
static message *parseEmailHeaders(message *m, const table_t *rfc821Table);
static int parseEmailHeader(message *m, const char *line, const table_t *rfc821Table);
@@ -302,13 +302,13 @@ static pthread_mutex_t tables_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif
int
cli_mbox(const char *dir, int desc, cli_ctx *ctx)
cli_mbox(const char *dir, cli_ctx *ctx)
{
if(dir == NULL) {
cli_dbgmsg("cli_mbox called with NULL dir\n");
return CL_ENULLARG;
}
return cli_parse_mbox(dir, desc, ctx);
return cli_parse_mbox(dir, ctx);
}
/*
@@ -327,7 +327,7 @@ cli_mbox(const char *dir, int desc, cli_ctx *ctx)
* e.g. \0Content-Type: application/binary;
*/
static int
cli_parse_mbox(const char *dir, int desc, cli_ctx *ctx)
cli_parse_mbox(const char *dir, cli_ctx *ctx)
{
int retcode;
message *body;

View File

@@ -50,6 +50,6 @@ typedef enum {
#include "uuencode.h"
size_t strstrip(char *s); /* remove trailing white space */
int cli_mbox(const char *dir, int desc, cli_ctx *ctx);
int cli_mbox(const char *dir, cli_ctx *ctx);
#endif /* __MBOX_H */

View File

@@ -1531,7 +1531,7 @@ static int cli_scanuuencoded(cli_ctx *ctx)
return ret;
}
static int cli_scanmail(int desc, cli_ctx *ctx)
static int cli_scanmail(cli_ctx *ctx)
{
char *dir;
int ret;
@@ -1552,7 +1552,7 @@ static int cli_scanmail(int desc, cli_ctx *ctx)
/*
* Extract the attachments into the temporary directory
*/
if((ret = cli_mbox(dir, desc, ctx))) {
if((ret = cli_mbox(dir, ctx))) {
if(!ctx->engine->keeptmp)
cli_rmdirs(dir);
free(dir);
@@ -2022,7 +2022,7 @@ static int cli_scanraw(cli_ctx *ctx, cli_file_t type, uint8_t typercg, cli_file_
ctx->container_size = map->len;
if(SCAN_MAIL && type == CL_TYPE_TEXT_ASCII && (DCONF_MAIL & MAIL_CONF_MBOX)) {
*dettype = CL_TYPE_MAIL;
nret = cli_scanmail(map->fd, ctx);
nret = cli_scanmail(ctx);
}
ctx->container_type = current_container_type;
ctx->container_size = current_container_size;
@@ -2341,7 +2341,7 @@ static int magic_scandesc(int desc, cli_ctx *ctx, cli_file_t type)
ctx->container_type = CL_TYPE_MAIL;
ctx->container_size = sb.st_size;
if(SCAN_MAIL && (DCONF_MAIL & MAIL_CONF_MBOX))
ret = cli_scanmail(desc, ctx);
ret = cli_scanmail(ctx);
break;
case CL_TYPE_TNEF: