summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-06-25 19:20:07 +0000
committerRussell Bryant <russell@russellbryant.com>2007-06-25 19:20:07 +0000
commitab56fcce5ce100a27bc3a50e57a95d56ac297fa6 (patch)
tree32f81066fe9a9bf731601603722cfc97538f8c8f /apps
parent82e20335195c832f6cacd2d4ce94b19eb0b4d590 (diff)
Allow compilation off app_voicemail with IMAP_STORAE against a system installed
version of the c-client library. (issue #10047, jcollie) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index c46e43f57..a0465c497 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -82,10 +82,16 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <ctype.h>
#include <signal.h>
#include <pwd.h>
+#ifdef USE_SYSTEM_IMAP
+#include <imap/c-client.h>
+#include <imap/imap4r1.h>
+#include <imap/linkage.h>
+#else
#include "c-client.h"
#include "imap4r1.h"
#include "linkage.h"
#endif
+#endif
#include "asterisk/lock.h"
#include "asterisk/file.h"
@@ -148,7 +154,7 @@ static void mm_parsequota (MAILSTREAM *stream, unsigned char *msg, QUOTALIST *pq
static void imap_mailbox_name(char *spec, struct vm_state *vms, int box, int target);
static int imap_store_file(char *dir, char *mailboxuser, char *mailboxcontext, int msgnum, struct ast_channel *chan, struct ast_vm_user *vmu, char *fmt, int duration, struct vm_state *vms);
static void update_messages_by_imapuser(const char *user, unsigned long number);
-
+static int count_messages(struct ast_vm_user *vmu, char *dir);
struct vmstate {
struct vm_state *vms;
@@ -4807,7 +4813,11 @@ static int init_mailstream(struct vm_state *vms, int box)
if (delimiter == '\0') { /* did not probe the server yet */
char *cp;
+#ifdef USE_SYSTEM_IMAP
+#include <imap/linkage.c>
+#else
#include "linkage.c"
+#endif
/* Connect to INBOX first to get folders delimiter */
imap_mailbox_name(tmp, vms, 0, 0);
stream = mail_open(stream, tmp, debug ? OP_DEBUG : NIL);