Skip to content

Commit

Permalink
lib-sieve: binary: Added means to obtain stat() information from load…
Browse files Browse the repository at this point in the history
…ed binary.
  • Loading branch information
stephanbosch committed Feb 12, 2017
1 parent 014df56 commit 602326e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib-sieve/sieve-binary.c
Expand Up @@ -181,6 +181,13 @@ time_t sieve_binary_mtime
return sbin->file->st.st_mtime;
}

const struct stat *sieve_binary_stat
(struct sieve_binary *sbin)
{
i_assert(sbin->file != NULL);
return &sbin->file->st;
}

const char *sieve_binary_script_name(struct sieve_binary *sbin)
{
return ( sbin->script == NULL ? NULL : sieve_script_name(sbin->script) );
Expand Down
3 changes: 3 additions & 0 deletions src/lib-sieve/sieve-binary.h
Expand Up @@ -35,6 +35,9 @@ const char *sieve_binary_path(struct sieve_binary *sbin);
struct sieve_script *sieve_binary_script(struct sieve_binary *sbin);

time_t sieve_binary_mtime(struct sieve_binary *sbin);
const struct stat *sieve_binary_stat
(struct sieve_binary *sbin);

const char *sieve_binary_script_name(struct sieve_binary *sbin);
const char *sieve_binary_script_location(struct sieve_binary *sbin);

Expand Down

0 comments on commit 602326e

Please sign in to comment.