/*
* Authors: Michael Zucchi <notzed@ximian.com>
*
- * Copyright 2001 Ximian, Inc. (www.ximian.com)
+ * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * modify it under the terms of version 2 of the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public
+ * You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*
*/
#include <config.h>
#endif
+#include <pthread.h>
#include <string.h>
#include <time.h>
+
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+
#include "camel-sasl-popb4smtp.h"
#include "camel-service.h"
#include "camel-session.h"
/* use 1 hour as our pop timeout */
#define POPB4SMTP_TIMEOUT (60*60)
-#ifdef ENABLE_THREADS
-#include <pthread.h>
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
#define POPB4SMTP_LOCK(l) pthread_mutex_lock(&l)
#define POPB4SMTP_UNLOCK(l) pthread_mutex_unlock(&l)
-#else
-#define POPB4SMTP_LOCK(l)
-#define POPB4SMTP_UNLOCK(l)
-#endif
static CamelSaslClass *parent_class = NULL;
sasl->authenticated = FALSE;
- popuri = camel_session_get_password (session, _("POP Source URI"), FALSE, FALSE,
- sasl->service, "popb4smtp_uri", ex);
+ popuri = camel_session_get_password (session, sasl->service, NULL, _("POP Source URI"), "popb4smtp_uri", 0, ex);
if (popuri == NULL) {
camel_exception_setv(ex, 1, _("POP Before SMTP auth using an unknown transport"));
return NULL;
}
- if (strncasecmp(popuri, "pop:", 4) != 0) {
+ if (g_ascii_strncasecmp(popuri, "pop:", 4) != 0) {
camel_exception_setv(ex, 1, _("POP Before SMTP auth using a non-pop source"));
return NULL;
}