celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Broekhuis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CELIX-215) curl_global_init() not called directly
Date Wed, 11 Feb 2015 15:21:11 GMT

    [ https://issues.apache.org/jira/browse/CELIX-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14316348#comment-14316348
] 

Alexander Broekhuis commented on CELIX-215:
-------------------------------------------

Removed obsolete usages of init/cleanup calls. I will also be looking at an alternative for
libcurl, since having such a dependency in the framework/launcher does not fit in the OSGi
concept.

---------------------
Author: abroekhuis
Date: Wed Feb 11 15:18:28 2015
New Revision: 1658988

URL: http://svn.apache.org/r1658988
Log:
CELIX-215: Removed obsolete usages of curl_global_init and curl_global_cleanup

Now that the launcher does the curl_global_init/cleanup, any other usage had to be removed.
It is only needed once.
---------------------
Author: abroekhuis
Date: Wed Feb 11 13:53:23 2015
New Revision: 1658960

URL: http://svn.apache.org/r1658960
Log:
CELIX-215: Added curl init/cleanup to the launcher

To be able to use curl properly it has to be initialised once while no other threads are running.
With Celix this cannot be done in a bundle, so to prevent problems during runtime, the launcher
now calls init/cleanup.
While this is not yet conditional, it could definitely be made an option. Environments that
do not use Curl probably don't want a launcher that depends on it.

> curl_global_init() not called directly
> --------------------------------------
>
>                 Key: CELIX-215
>                 URL: https://issues.apache.org/jira/browse/CELIX-215
>             Project: Celix
>          Issue Type: Bug
>            Reporter: Daniel Parker
>            Priority: Minor
>             Fix For: next
>
>
> curl_global_init() is called by curl_easy_init() if it has not been called already (so
the system works as-is), but according to the documentation, curl_global_init() is not thread-safe,
so it really ought to be called in launcher.c::main() before it starts spawning threads.
> Also, curl_global_cleanup() needs to be called after we're done with curl.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message