There is no attempt in the c-client library to work in any reasonable way
with multiple non-coordinated plugins, each of which uses c-client. It
would not help to include linkage.c more than once; at best doing so would
do nothing and at worst it could cause all sorts of confusiong.
c-client is designed to have a main application coordinating c-client
linkage and callbacks.
In general, threading won't work well unless your threading library
provides independent context for functions which have cross-call context
(strtok() being an obvious example). Most threading libraries do not do
this; they instead expect you to use alternative interfaces and make the
application deal with providing the context. Furthermore, some c-client
configuration is global (and it should be).
In conclusion, c-client is intended to have a main program which
coordinates its usage.
On Tue, 5 Sep 2006, Christian Wieninger wrote:
I'm using the c-client library to send mails via SMTP within a plugin of the
great VDR (http://www.cadsoft.de/vdr). Plugins are realized here as shared
libraries.
There are other plugins that also could use the c-client library. So my
question is: What about the callback routines like mm_login? If two plugins
exist we have two versions of the callback routines. So what version will be
used within c-client and is there a way to assure that only the callbacks of
the corresponding plugin are used. Don't know if the following could solve
this: Is it allowed to include linkage.c more than once?
To make things even more complicated ;-): Plugins can do background tasks
within a separate thread. What if two c-client jobs would run at the same
time?
-- Mark --
http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw