Commit 1ec3df9a 1ec3df9a5798322d511d88100dd046a67b8cf38b by Sergey Poznyakoff

Fix compilation without gnutls

* imap4d/imap4d.c [WITH_TLS] (cb_tls_required): Conditional compilation.
* imap4d/imap4d.h [!WITH_TLS] (tls_encryption_on): Empty define.
* pop3d/pop3d.c [!WITH_TLS] (tls_available): Empty define.
* libmu_scm/mu_mailbox.c (mu_scm_mailbox_print): Fix format string.
1 parent e8bc2682
......@@ -284,6 +284,7 @@ cb_tls (void *data, mu_config_value_t *val)
}
#endif
#ifdef WITH_TLS
static int
cb_tls_required (void *data, mu_config_value_t *val)
{
......@@ -307,6 +308,7 @@ cb_tls_required (void *data, mu_config_value_t *val)
return 0;
}
#endif
static mu_list_t auth_deny_user_list, auth_allow_user_list;
static mu_list_t auth_deny_group_list, auth_allow_group_list;
......
......@@ -339,6 +339,8 @@ extern int imap4d_starttls (struct imap4d_session *,
struct imap4d_command *, imap4d_tokbuf_t);
extern void starttls_init (void);
void tls_encryption_on (struct imap4d_session *);
#else
# define tls_encryption_on(s)
#endif /* WITH_TLS */
extern int imap4d_status (struct imap4d_session *,
struct imap4d_command *, imap4d_tokbuf_t);
......
......@@ -95,7 +95,7 @@ biff_notify (mu_observer_t obs, size_t type, void *data, void *action_data)
{
sendto (fd, buf, strlen (buf), 0,
mbox->notify_sa, sizeof (struct sockaddr_in));
//FIXME: on error?
/*FIXME: on error?*/
free (buf);
}
}
......@@ -110,8 +110,6 @@ mu_mailbox_set_notify (mu_mailbox_t mbox, const char *user)
if (!mbox)
return EINVAL;
// if (!(mbox->flags & MU_STREAM_APPEND))
// return EACCES;
if (user)
user = strdup (user);
......
......@@ -81,7 +81,7 @@ mu_scm_mailbox_print (SCM mailbox_smob, SCM port, scm_print_state * pstate)
scm_puts (p, port);
snprintf (buf, sizeof (buf), " (%d)", count);
snprintf (buf, sizeof (buf), " (%lu)", (unsigned long) count);
scm_puts (buf, port);
}
else
......
......@@ -131,7 +131,7 @@ mu_smtp_auth (mu_smtp_t smtp)
#else
/* FIXME: Provide support for some basic authentication methods.
Once done, make sure _mu_smtp_fixup_params is called for this
branc as well (though see the fixme above). */
branch as well (though see the fixme above). */
return ENOSYS;
#endif
}
......
......@@ -42,6 +42,8 @@ enum tls_mode tls_mode;
#ifdef WITH_TLS
int tls_available;
int tls_done;
#else
# define tls_available 0
#endif /* WITH_TLS */
int initial_state = AUTHORIZATION;
......@@ -172,7 +174,6 @@ cb_tls (void *data, mu_config_value_t *val)
mu_error (_("not a valid tls keyword: %s"), val->v.string);
return 0;
}
#endif
static int
cb_tls_required (void *data, mu_config_value_t *val)
......@@ -197,6 +198,7 @@ cb_tls_required (void *data, mu_config_value_t *val)
return 0;
}
#endif
static struct mu_cfg_param pop3d_srv_param[] = {
#ifdef WITH_TLS
......