SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
70
telephony/asterisk/18/patches/patch-apps_app_voicemail_c
Normal file
70
telephony/asterisk/18/patches/patch-apps_app_voicemail_c
Normal file
|
@ -0,0 +1,70 @@
|
|||
test for alpine-2.22's c-client and cope with API change.
|
||||
parts borrowed from slackware patch for PHP with alpine-2.22.
|
||||
|
||||
Index: apps/app_voicemail.c
|
||||
--- apps/app_voicemail.c.orig
|
||||
+++ apps/app_voicemail.c
|
||||
@@ -60,6 +60,9 @@
|
||||
#include <c-client/c-client.h>
|
||||
#include <c-client/imap4r1.h>
|
||||
#include <c-client/linkage.h>
|
||||
+#if defined (HAVE_IMAP_ALPINE2_22)
|
||||
+char *cpystr(const char *str); /* from c-client/misc.h but that has namespace problems */
|
||||
+#endif
|
||||
#else
|
||||
#include "c-client.h"
|
||||
#include "imap4r1.h"
|
||||
@@ -3305,7 +3308,11 @@ void mm_dlog(char *string)
|
||||
}
|
||||
|
||||
|
||||
+#if defined(HAVE_IMAP_ALPINE2_22)
|
||||
+void mm_login(NETMBX * mb, char *user, char **pwd, long trial)
|
||||
+#else
|
||||
void mm_login(NETMBX * mb, char *user, char *pwd, long trial)
|
||||
+#endif
|
||||
{
|
||||
struct ast_vm_user *vmu;
|
||||
|
||||
@@ -3315,22 +3322,41 @@ void mm_login(NETMBX * mb, char *user, char *pwd, long
|
||||
|
||||
/* We should only do this when necessary */
|
||||
if (!ast_strlen_zero(authpassword)) {
|
||||
+#if defined(HAVE_IMAP_ALPINE2_22)
|
||||
+ *pwd = cpystr(authpassword);
|
||||
+#else
|
||||
ast_copy_string(pwd, authpassword, MAILTMPLEN);
|
||||
+#endif
|
||||
} else {
|
||||
AST_LIST_TRAVERSE(&users, vmu, list) {
|
||||
if (!strcasecmp(mb->user, vmu->imapuser)) {
|
||||
+#if defined(HAVE_IMAP_ALPINE2_22)
|
||||
+ *pwd = cpystr(vmu->imappassword);
|
||||
+#else
|
||||
ast_copy_string(pwd, vmu->imappassword, MAILTMPLEN);
|
||||
+#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!vmu) {
|
||||
if ((vmu = find_user_realtime_imapuser(mb->user))) {
|
||||
+#if defined(HAVE_IMAP_ALPINE2_22)
|
||||
+ *pwd = cpystr(vmu->imappassword);
|
||||
+#else
|
||||
ast_copy_string(pwd, vmu->imappassword, MAILTMPLEN);
|
||||
+#endif
|
||||
free_user(vmu);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+#if defined(HAVE_IMAP_ALPINE2_22)
|
||||
+void mm_login_method(NETMBX *mb, char *user, void *pwd, long trial, char *method)
|
||||
+{
|
||||
+ return;
|
||||
+}
|
||||
+#endif
|
||||
|
||||
|
||||
void mm_critical(MAILSTREAM * stream)
|
Loading…
Add table
Add a link
Reference in a new issue