[Imap-uw] Making multiple Imap Client Connection im my application
pankaj.bathwal at agnity.com
Thu Jul 17 01:42:29 PDT 2008
I am using c-client to make IMAP connection to mail server.
My application is multi-threaded and need to make multiple client
connections in different threads.
While trying to connect using mail_open in more than one thread
simultaneously, I am facing an issue.
I am getting a fetal error in log "env_init called twice" and c-client calls
abort to terminate the application.
My question is:
Can we make multiple simultaneous calls to mail_open in different threads to
connect to mail server as different mail user?
Is there another way to support multiple client connection simultaneously?
This is stack trace of aborted thread.
 __sigprocmask(0x0, 0xfedfbf70, 0x0, 0x0, 0x0, 0x0), at 0xff1091f0
 _resetsig(0xff10b7f4, 0x0, 0x0, 0xfedffd98, 0xff11c000, 0x0), at
 _sigon(0xfedffd98, 0xff1238a8, 0x6, 0xfedfc044, 0xfedffd98,
0xff12321c), at 0xff0fdd0c
 _thrp_kill(0x0, 0x5, 0x6, 0xff11c000, 0x5, 0xff0c0458), at 0xff100d4c
 raise(0x6, 0x0, 0x0, 0xffffffff, 0x1da3e0, 0xfedfba10), at 0xff04bce0
 abort(0xff0bc008, 0x1a3b50, 0x1d45b0, 0x0, 0x0, 0xef000), at
 fatal(string = ???) (optimized), at 0x2b708 (line ~38) in "ftl_unix.c"
 env_init(user = ???, home = ???) (optimized), at 0x2f3ec (line ~798)
 myusername_full(flags = ???) (optimized), at 0x2f978 (line ~901) in
 tcp_aopen(mb = ???, service = ???, usrbuf = ???) (optimized), at
0x33a00 (line ~373) in "tcp_unix.c"
 net_aopen(dv = ???, mb = ???, service = ???, user = ???) (optimized),
at 0x49cac (line ~6211) in "mail.c"
 imap_rimap(stream = ???, service = ???, mb = ???, usr = ???, tmp =
???) (optimized), at 0x64220 (line ~1033) in "imap4r1.c"
 imap_open(stream = ???) (optimized), at 0x63698 (line ~869) in
 mail_open_work(d = ???, stream = ???, name = ???, options = ???)
(optimized), at 0x3c378 (line ~1340) in "mail.c"
 mail_open(stream = ???, name = ???, options = ???) (optimized), at
0x3bebc (line ~1262) in "mail.c"
 ImapClient::connectToServer(this = ???) (optimized), at 0xaae10 (line
~48) in "ImapClient.c"
 ImapClientMgr::getNewImapClient(this = ???, p_MailHost = CLASS,
p_Username = CLASS, p_Password = CLASS) (optimized), at 0x29540 (line ~39)
 ImapThreadFunc(arg = ???) (optimized), at 0x2a8dc (line ~42) in
Thanks and Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Imap-uw