summaryrefslogtreecommitdiff
path: root/camel/providers/imapx/test-imapx.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2009-09-30 15:43:21 +0530
committerChenthill Palanisamy <pchenthill@novell.com>2009-09-30 15:43:21 +0530
commita0a57d65aad133d8e17b4ad62556fc52f74dc32a (patch)
treea421980ce82f47e8921fd0e2176342d5b768dfaf /camel/providers/imapx/test-imapx.c
parent0e943121c10e27af12dccd4154d0d2a74f452de7 (diff)
downloadevolution-data-server-a0a57d65aad133d8e17b4ad62556fc52f74dc32a.tar.gz
Pass uri as an argument.
Diffstat (limited to 'camel/providers/imapx/test-imapx.c')
-rw-r--r--camel/providers/imapx/test-imapx.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/camel/providers/imapx/test-imapx.c b/camel/providers/imapx/test-imapx.c
index 735432cd9..6153b1e9e 100644
--- a/camel/providers/imapx/test-imapx.c
+++ b/camel/providers/imapx/test-imapx.c
@@ -3,8 +3,6 @@
#include "camel-imapx-folder.h"
#include <camel/camel-session.h>
-#define URL "imapx://pchenthill@prv1-3.novell.com/;check_lsub;basic_headers=1;imap_custom_headers;command=ssh%20-C%20-l%20%25u%20%25h%20exec%20/usr/sbin/imapd;use_ssl=always"
-
int
main (int argc, char *argv [])
{
@@ -13,6 +11,13 @@ main (int argc, char *argv [])
gchar *uri = NULL;
CamelService *service;
+
+ if (argc != 2) {
+ printf ("Pass the account url argument \n");
+ return -1;
+ }
+
+ uri = argv [1];
g_thread_init (NULL);
system ("rm -rf /tmp/test-camel-imapx");
camel_init ("/tmp/test-camel-imapx");
@@ -22,8 +27,8 @@ main (int argc, char *argv [])
session = CAMEL_SESSION (camel_object_new (CAMEL_SESSION_TYPE));
camel_session_construct (session, "/tmp/test-camel-imapx");
- service = camel_session_get_service (session, URL, CAMEL_PROVIDER_STORE, ex);
+ service = camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, ex);
camel_service_connect (service, ex);
- exit (1);
+ return 0;
}