Author: abroekhuis
Date: Thu Dec 15 10:12:04 2011
New Revision: 1214685

URL: http://svn.apache.org/viewvc?rev=1214685&view=rev
Log:
API Fixes

Updated APIs for APR usage. Refactored code to create a new service_reference 
for each requester.

Added:
    incubator/celix/trunk/Hello world Massif.launch
    incubator/celix/trunk/framework/Doxyfile.in
    incubator/celix/trunk/framework/private/include/framework_log.h
Modified:
    incubator/celix/trunk/.cproject
    incubator/celix/trunk/Hello World.launch
    incubator/celix/trunk/Remote Services.launch
    incubator/celix/trunk/WB Dependency Manager.launch
    incubator/celix/trunk/cmake/Packaging.cmake
    incubator/celix/trunk/dependency_manager/service_component.c
    incubator/celix/trunk/dependency_manager/service_dependency.c
    incubator/celix/trunk/deployment_admin/private/src/deployment_package.c
    
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/activator.c
    incubator/celix/trunk/examples/whiteboard/publisherA/activator.c
    incubator/celix/trunk/examples/whiteboard/publisherB/activator.c
    incubator/celix/trunk/framework/private/include/bundle.h
    incubator/celix/trunk/framework/private/include/capability.h
    incubator/celix/trunk/framework/private/include/framework.h
    incubator/celix/trunk/framework/private/include/headers.h
    incubator/celix/trunk/framework/private/include/manifest_parser.h
    incubator/celix/trunk/framework/private/include/requirement.h
    incubator/celix/trunk/framework/private/include/service_reference.h
    incubator/celix/trunk/framework/private/include/service_registration.h
    incubator/celix/trunk/framework/private/include/service_registry.h
    incubator/celix/trunk/framework/private/include/version.h
    incubator/celix/trunk/framework/private/include/version_range.h
    incubator/celix/trunk/framework/private/include/wire.h
    incubator/celix/trunk/framework/private/src/bundle.c
    incubator/celix/trunk/framework/private/src/capability.c
    incubator/celix/trunk/framework/private/src/filter.c
    incubator/celix/trunk/framework/private/src/framework.c
    incubator/celix/trunk/framework/private/src/manifest_parser.c
    incubator/celix/trunk/framework/private/src/module.c
    incubator/celix/trunk/framework/private/src/requirement.c
    incubator/celix/trunk/framework/private/src/resolver.c
    incubator/celix/trunk/framework/private/src/service_reference.c
    incubator/celix/trunk/framework/private/src/service_registration.c
    incubator/celix/trunk/framework/private/src/service_registry.c
    incubator/celix/trunk/framework/private/src/service_tracker.c
    incubator/celix/trunk/framework/private/src/version.c
    incubator/celix/trunk/framework/private/src/version_range.c
    incubator/celix/trunk/framework/private/src/wire.c
    incubator/celix/trunk/launcher/launcher.c
    incubator/celix/trunk/log_service/private/src/log.c
    incubator/celix/trunk/log_service/private/src/log_service_activator.c
    incubator/celix/trunk/log_service/private/src/log_service_impl.c
    incubator/celix/trunk/log_writer/dependency_activator.c
    incubator/celix/trunk/log_writer/log_writer.c
    incubator/celix/trunk/log_writer/log_writer.h
    incubator/celix/trunk/remote_services/discovery/private/src/discovery.c
    
incubator/celix/trunk/remote_services/remote_service_admin/private/src/remote_service_admin_impl.c
    
incubator/celix/trunk/remote_services/topology_manager/private/src/activator.c
    
incubator/celix/trunk/remote_services/topology_manager/private/src/topology_manager.c
    incubator/celix/trunk/shell/inspect_command.c
    incubator/celix/trunk/shell/shell.c
    incubator/celix/trunk/shell_tui/shell_tui.c
    incubator/celix/trunk/target.cmake
    incubator/celix/trunk/utils/private/src/array_list.c
    incubator/celix/trunk/utils/private/src/linkedlist.c
    incubator/celix/trunk/utils/public/include/linkedlist.h

Modified: incubator/celix/trunk/.cproject
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/.cproject?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/.cproject (original)
+++ incubator/celix/trunk/.cproject Thu Dec 15 10:12:04 2011
@@ -100,7 +100,7 @@
                <buildTargets>
                        <target name="all" path="" 
targetID="org.eclipse.cdt.build.MakeTargetBuilder">
                                <buildCommand>make</buildCommand>
-                               <buildArguments>-j4 -C 
${workspace_loc:/celix}/build</buildArguments>
+                               <buildArguments>-C 
${workspace_loc:/celix}/build</buildArguments>
                                <buildTarget>all</buildTarget>
                                <stopOnError>true</stopOnError>
                                <useDefaultCommand>false</useDefaultCommand>
@@ -116,6 +116,7 @@
                        </target>
                        <target name="run cmake" path="" 
targetID="org.eclipse.cdt.build.MakeTargetBuilder">
                                <buildCommand>cmake</buildCommand>
+                               <buildArguments/>
                                <buildTarget>-E chdir 
${workspace_loc:/celix}/build cmake -G "Unix Makefiles" ../</buildTarget>
                                <stopOnError>true</stopOnError>
                                <useDefaultCommand>false</useDefaultCommand>

Modified: incubator/celix/trunk/Hello World.launch
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/Hello%20World.launch?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/Hello World.launch (original)
+++ incubator/celix/trunk/Hello World.launch Thu Dec 15 10:12:04 2011
@@ -29,7 +29,7 @@
 <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" 
value="main"/>
 <booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" 
value="false"/>
 <booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" 
value="false"/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content 
id=&quot;componentData-bundleActivator_create-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;key-hashMapIterator_remove-(cast)&quot; val=&quot;char 
*&quot;/&gt;&lt;content id=&quot;userData-userData-fw_startBundle-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;*userData-userData-bundleActivator_create-(cast)&quot; 
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;userData-*userData-userData-bundleActivator_create-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;userData-data-bundleActivator_start-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;userData-fw_startBundle-(cast)&quot; 
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;userData-bundleActivator_stop-(cast)&quot; val=&quot;DEPENDE
 NCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;userData-userData-bundleActivator_stop-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;/contentList&gt;"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content 
id=&quot;element-next-header-capabilities-parser-manifestParser_getCapabilities-(cast)&quot;
 val=&quot;CAPABILITY&quot;/&gt;&lt;content 
id=&quot;userData-bundleActivator_stop-(cast)&quot; 
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;componentData-bundleActivator_create-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;key-hashMapIterator_remove-(cast)&quot; val=&quot;char 
*&quot;/&gt;&lt;content id=&quot;userData-userData-fw_startBundle-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;*userData-userData-bundleActivator_create-(cast)&quot; 
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;userData-*userData-userData-bundleActivator_create-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content id=&quot;userData-data-bundleA
 ctivator_start-(cast)&quot; val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;userData-fw_startBundle-(cast)&quot; 
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;userData-userData-bundleActivator_stop-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;/contentList&gt;"/>
 <stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&#10;&lt;globalVariableList/&gt;&#10;"/>
 <stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList/&gt;&#10;"/>
 <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" 
value="build/launcher/launcher"/>

Added: incubator/celix/trunk/Hello world Massif.launch
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/Hello%20world%20Massif.launch?rev=1214685&view=auto
==============================================================================
--- incubator/celix/trunk/Hello world Massif.launch (added)
+++ incubator/celix/trunk/Hello world Massif.launch Thu Dec 15 10:12:04 2011
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration 
type="org.eclipse.linuxtools.valgrind.launch.valgrindLaunch">
+<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" 
value="0"/>
+<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
+<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" 
value="build/launcher/launcher"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="celix"/>
+<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" 
value="true"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" 
value="cdt.managedbuild.toolchain.gnu.macosx.base.1808592147"/>
+<stringAttribute key="org.eclipse.cdt.launch.WORKING_DIRECTORY" 
value="${workspace_loc:celix/build/deploy/hello_world}"/>
+<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/celix"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DYLD_LIBRARY_PATH" 
value="${workspace_loc:celix/build/framework}:${workspace_loc:celix/build/utils}"/>
+</mapAttribute>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.BRANCH_SIM" 
value="false"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.CACHE_SIM" 
value="true"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.D1" 
value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.D1_ASSOC" 
value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.D1_LSIZE" 
value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.D1_SIZE" 
value="0"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.I1" 
value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.I1_ASSOC" 
value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.I1_LSIZE" 
value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.I1_SIZE" 
value="0"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.L2" 
value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.L2_ASSOC" 
value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.L2_LSIZE" 
value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.cachegrind.L2_SIZE" 
value="0"/>
+<intAttribute 
key="org.eclipse.linuxtools.valgrind.helgrind.HELGRIND_CACHESIZE" 
value="1000000"/>
+<stringAttribute 
key="org.eclipse.linuxtools.valgrind.helgrind.HELGRIND_HISTORYLEVEL" 
value="full"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.helgrind.HELGRIND_LOCKORDERS" 
value="true"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.launch.GENERAL_BELOWMAIN" value="false"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.launch.GENERAL_DEMANGLE" value="true"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.launch.GENERAL_DSYMUTIL" value="true"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.launch.GENERAL_ERRLIMIT" value="true"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_FREERES" 
value="true"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_MAINSTACK" 
value="0"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.launch.GENERAL_MAINSTACK_BOOL" 
value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_MAXFRAME" 
value="2000000"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_NUMCALLERS" 
value="12"/>
+<listAttribute key="org.eclipse.linuxtools.valgrind.launch.GENERAL_SUPPFILES"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.launch.GENERAL_TRACECHILD" value="true"/>
+<stringAttribute key="org.eclipse.linuxtools.valgrind.launch.OUTPUT_DIR" 
value="/Users/alexander/Documents/Projects/CelixGIT/.metadata/.plugins/org.eclipse.linuxtools.valgrind.launch"/>
+<stringAttribute key="org.eclipse.linuxtools.valgrind.launch.TOOL" 
value="org.eclipse.linuxtools.valgrind.launch.massif"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.massif.MASSIF_ALIGNMENT_BOOL" 
value="false"/>
+<intAttribute 
key="org.eclipse.linuxtools.valgrind.massif.MASSIF_ALIGNMENT_VAL" value="0"/>
+<listAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_ALLOCFN"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_DEPTH" 
value="30"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_DETAILEDFREQ" 
value="10"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_HEAP" 
value="true"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_HEAPADMIN" 
value="8"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_MAXSNAPSHOTS" 
value="100"/>
+<intAttribute 
key="org.eclipse.linuxtools.valgrind.massif.MASSIF_PEAKINACCURACY" value="10"/>
+<booleanAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_STACKS" 
value="false"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_THRESHOLD" 
value="10"/>
+<stringAttribute key="org.eclipse.linuxtools.valgrind.massif.MASSIF_TIMEUNIT" 
value="i"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_ALIGNMENT_BOOL" 
value="false"/>
+<intAttribute 
key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_ALIGNMENT_VAL" 
value="0"/>
+<intAttribute key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_FREELIST" 
value="10000000"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_GCCWORK" value="false"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_LEAKCHECK" value="true"/>
+<stringAttribute 
key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_LEAKRES" value="low"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_PARTIAL" value="false"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_SHOWREACH" 
value="false"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_TRACKORIGINS" 
value="false"/>
+<booleanAttribute 
key="org.eclipse.linuxtools.valgrind.memcheck.MEMCHECK_UNDEF" value="true"/>
+</launchConfiguration>

Modified: incubator/celix/trunk/Remote Services.launch
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/Remote%20Services.launch?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/Remote Services.launch (original)
+++ incubator/celix/trunk/Remote Services.launch Thu Dec 15 10:12:04 2011
@@ -29,7 +29,7 @@
 <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" 
value="main"/>
 <booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" 
value="false"/>
 <booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" 
value="false"/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content 
id=&quot;userData-bundleActivator_stop-(cast)&quot; 
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;*table-table-exportedServices-admin-activator-bundleActivator_stop-(cast_to_array)&quot;
 val=&quot;0:1&quot;/&gt;&lt;content 
id=&quot;componentData-bundleActivator_create-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;key-hashMapIterator_remove-(cast)&quot; val=&quot;char 
*&quot;/&gt;&lt;content id=&quot;userData-userData-fw_startBundle-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;*userData-userData-bundleActivator_create-(cast)&quot; 
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;userData-*userData-userData-bundleActivator_create-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content id=&quot;userData-data-bundleAct
 ivator_start-(cast)&quot; val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;userData-fw_startBundle-(cast)&quot; 
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;userData-userData-bundleActivator_stop-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;/contentList&gt;"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content 
id=&quot;userData-fw_startBundle-(cast)&quot; 
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;ref-fw_addServiceListener-(cast)&quot; 
val=&quot;SERVICE_REGISTRATION&quot;/&gt;&lt;content 
id=&quot;*elementData-elementData-listenerHooks-fw_addServiceListener-(cast)&quot;
 val=&quot;listener_hook_service_t&quot;/&gt;&lt;content 
id=&quot;userData-bundleActivator_stop-(cast)&quot; 
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;*table-table-exportedServices-admin-activator-bundleActivator_stop-(cast_to_array)&quot;
 val=&quot;0:1&quot;/&gt;&lt;content 
id=&quot;componentData-bundleActivator_create-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;key-hashMapIterator_remove-(cast)&quot; val=&quot;char 
*&quot;/&gt;&lt;content id=&quot;userData-userData-f
 w_startBundle-(cast)&quot; val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;*userData-userData-bundleActivator_create-(cast)&quot; 
val=&quot;DEPENDENCY_ACTIVATOR_BASE&quot;/&gt;&lt;content 
id=&quot;userData-*userData-userData-bundleActivator_create-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;userData-data-bundleActivator_start-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;content 
id=&quot;userData-userData-bundleActivator_stop-(cast)&quot; 
val=&quot;log_writer_t&quot;/&gt;&lt;/contentList&gt;"/>
 <stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&#10;&lt;globalVariableList/&gt;&#10;"/>
 <stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList/&gt;&#10;"/>
 <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" 
value="build/launcher/launcher"/>

Modified: incubator/celix/trunk/WB Dependency Manager.launch
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/WB%20Dependency%20Manager.launch?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/WB Dependency Manager.launch (original)
+++ incubator/celix/trunk/WB Dependency Manager.launch Thu Dec 15 10:12:04 2011
@@ -29,7 +29,7 @@
 <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" 
value="main"/>
 <booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" 
value="false"/>
 <booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" 
value="false"/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content 
id=&quot;element-linkedList_addElement-(cast)&quot; 
val=&quot;log_entry_t&quot;/&gt;&lt;content 
id=&quot;service-tracker_addLog-(cast)&quot; 
val=&quot;log_service_t&quot;/&gt;&lt;content 
id=&quot;factory-logFactory_getService-(cast)&quot; 
val=&quot;service_factory_t&quot;/&gt;&lt;content 
id=&quot;pool-factory-factory-logFactory_getService-(cast)&quot; 
val=&quot;apr_pool_t *&quot;/&gt;&lt;content 
id=&quot;factory-factory-logFactory_getService-(cast)&quot; 
val=&quot;log_service_factory_t&quot;/&gt;&lt;/contentList&gt;"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content 
id=&quot;*elementData-elementData-null-findFwServiceTracker-(cast_to_array)&quot;
 val=&quot;0:2&quot;/&gt;&lt;content 
id=&quot;elementData-null-findFwServiceTracker-(cast_to_array)&quot; 
val=&quot;0:2&quot;/&gt;&lt;content 
id=&quot;element-linkedList_addElement-(cast)&quot; 
val=&quot;log_entry_t&quot;/&gt;&lt;content 
id=&quot;service-tracker_addLog-(cast)&quot; 
val=&quot;log_service_t&quot;/&gt;&lt;content 
id=&quot;factory-logFactory_getService-(cast)&quot; 
val=&quot;service_factory_t&quot;/&gt;&lt;content 
id=&quot;pool-factory-factory-logFactory_getService-(cast)&quot; 
val=&quot;apr_pool_t *&quot;/&gt;&lt;content 
id=&quot;factory-factory-logFactory_getService-(cast)&quot; 
val=&quot;log_service_factory_t&quot;/&gt;&lt;content 
id=&quot;elementData-null-findFwServiceTracker-(cast)&quot; val=&quot;vo
 id *[2]&quot;/&gt;&lt;content 
id=&quot;elementData[0]-elementData-null-findFwServiceTracker-(cast)&quot; 
val=&quot;FW_SERVICE_TRACKER&quot;/&gt;&lt;content 
id=&quot;elementData[1]-elementData-null-findFwServiceTracker-(cast)&quot; 
val=&quot;FW_SERVICE_TRACKER&quot;/&gt;&lt;/contentList&gt;"/>
 <stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&#10;&lt;globalVariableList/&gt;&#10;"/>
 <stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml 
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; 
standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList/&gt;&#10;"/>
 <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" 
value="build/launcher/launcher"/>

Modified: incubator/celix/trunk/cmake/Packaging.cmake
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/Packaging.cmake?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/cmake/Packaging.cmake (original)
+++ incubator/celix/trunk/cmake/Packaging.cmake Thu Dec 15 10:12:04 2011
@@ -138,7 +138,7 @@ MACRO(deploy)
        CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/run.sh.in 
${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/run.sh @ONLY)
        
        GET_DIRECTORY_PROPERTY(PROPS ADDITIONAL_MAKE_CLEAN_FILES)
-       SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES 
"${PROPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}")
+       SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES 
"${PROPS};${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/bundles")
        
        #install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME} 
DESTINATION . COMPONENT ${DEPLOY_COMPONENT})
        #ADD_CUSTOM_TARGET(clean_${__packageTarget}

Modified: incubator/celix/trunk/dependency_manager/service_component.c
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/service_component.c?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/service_component.c (original)
+++ incubator/celix/trunk/dependency_manager/service_component.c Thu Dec 15 
10:12:04 2011
@@ -386,8 +386,10 @@ STATE state_create(ARRAY_LIST dependenci
 }
 
 void state_destroy(STATE state) {
-       arrayList_destroy(state->dependencies);
-       state->dependencies = NULL;
+       if (state->dependencies != NULL) {
+               arrayList_destroy(state->dependencies);
+               state->dependencies = NULL;
+       }
        state->state = STATE_INACTIVE;
        free(state);
        state = NULL;

Modified: incubator/celix/trunk/dependency_manager/service_dependency.c
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/service_dependency.c?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/service_dependency.c (original)
+++ incubator/celix/trunk/dependency_manager/service_dependency.c Thu Dec 15 
10:12:04 2011
@@ -93,6 +93,7 @@ void serviceDependency_start(SERVICE_DEP
 void serviceDependency_stop(SERVICE_DEPENDENCY dependency, SERVICE service) {
        dependency->started = true;
        serviceTracker_close(dependency->tracker);
+       tracker_destroy(dependency->tracker);
 }
 
 celix_status_t serviceDependency_addingService(void * handle, 
SERVICE_REFERENCE reference, void **service) {

Modified: 
incubator/celix/trunk/deployment_admin/private/src/deployment_package.c
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/private/src/deployment_package.c?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/private/src/deployment_package.c 
(original)
+++ incubator/celix/trunk/deployment_admin/private/src/deployment_package.c Thu 
Dec 15 10:12:04 2011
@@ -83,8 +83,7 @@ celix_status_t deploymentPackage_getBund
 
 celix_status_t deploymentPackage_getVersion(deployment_package_t package, 
VERSION *version) {
        char *versionStr = manifest_getValue(package->manifest, 
"DeploymentPackage-Version");
-       *version = version_createVersionFromString(versionStr);
-       return CELIX_SUCCESS;
+       return version_createVersionFromString(package->pool, versionStr, 
version);
 }
 
 celix_status_t deploymentPackage_setBundleInfos(deployment_package_t package) {
@@ -103,7 +102,8 @@ celix_status_t deploymentPackage_setBund
                info->attributes = values;
                info->symbolicName = properties_get(values, (char *) 
BUNDLE_SYMBOLICNAME);
                char *version = properties_get(values, (char *) BUNDLE_VERSION);
-               info->version = version_createVersionFromString(version);
+               info->version = NULL;
+               status = version_createVersionFromString(package->pool, 
version, &info->version);
 
                arrayList_add(package->bundleInfos, info);
        }

Modified: 
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/activator.c
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/activator.c?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- 
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/activator.c
 (original)
+++ 
incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/paint/private/src/activator.c
 Thu Dec 15 10:12:04 2011
@@ -29,6 +29,7 @@
 #include "simple_shape.h"
 #include "paint_frame.h"
 #include "service_tracker.h"
+#include "service_reference.h"
 
 struct paintFrameActivatorData {
        SERVICE_REGISTRATION reg;
@@ -97,20 +98,26 @@ celix_status_t addingServ(void * handle,
 
 celix_status_t addedServ(void * handle, SERVICE_REFERENCE ref, void * service) 
{
        struct paintFrameActivatorData * data = (struct paintFrameActivatorData 
*) handle;
-       char * serviceName = properties_get(ref->registration->properties, 
"name");
+       SERVICE_REGISTRATION reg = NULL;
+       serviceReference_getServiceRegistration(ref, &reg);
+       char * serviceName = properties_get(reg->properties, "name");
        paintFrame_addShape(data->paint_frame, data->context, service);
        return CELIX_SUCCESS;
  }
 
 celix_status_t modifiedServ(void * handle, SERVICE_REFERENCE ref, void * 
service) {
        struct paintFrameActivatorData * data = (struct paintFrameActivatorData 
*) handle;
-       char * serviceName = properties_get(ref->registration->properties, 
"name");
+       SERVICE_REGISTRATION reg = NULL;
+       serviceReference_getServiceRegistration(ref, &reg);
+       char * serviceName = properties_get(reg->properties, "name");
        return CELIX_SUCCESS;
 }
 
 celix_status_t removedServ(void * handle, SERVICE_REFERENCE ref, void * 
service) {
        struct paintFrameActivatorData * data = (struct paintFrameActivatorData 
*) handle;
-       char * serviceName = properties_get(ref->registration->properties, 
"name");
+       SERVICE_REGISTRATION reg = NULL;
+       serviceReference_getServiceRegistration(ref, &reg);
+       char * serviceName = properties_get(reg->properties, "name");
        paintFrame_removeShape(data->paint_frame, service);
        return CELIX_SUCCESS;
 }

Modified: incubator/celix/trunk/examples/whiteboard/publisherA/activator.c
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/examples/whiteboard/publisherA/activator.c?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/examples/whiteboard/publisherA/activator.c (original)
+++ incubator/celix/trunk/examples/whiteboard/publisherA/activator.c Thu Dec 15 
10:12:04 2011
@@ -28,10 +28,13 @@
 #include "bundle_context.h"
 #include "publisher_private.h"
 #include "celix_errno.h"
+#include "service_registration.h"
 
 struct activatorData {
     PUBLISHER_SERVICE ps;
     PUBLISHER pub;
+
+    SERVICE_REGISTRATION reg;
 };
 
 celix_status_t bundleActivator_create(BUNDLE_CONTEXT context, void **userData) 
{
@@ -56,12 +59,12 @@ celix_status_t bundleActivator_start(voi
         data->pub = apr_pcalloc(pool, sizeof(*(data->pub)));
         data->ps->invoke = publisher_invoke;
         data->ps->publisher = data->pub;
+        data->reg = NULL;
 
         PROPERTIES props = properties_create();
         properties_set(props, "id", "A");
 
-        SERVICE_REGISTRATION service_registration = NULL;
-        status = bundleContext_registerService(context, PUBLISHER_NAME, 
data->ps, props, &service_registration);
+        status = bundleContext_registerService(context, PUBLISHER_NAME, 
data->ps, props, &data->reg);
         if (status != CELIX_SUCCESS) {
                printf("Error: %s\n", celix_strerror(status));
         }
@@ -73,6 +76,10 @@ celix_status_t bundleActivator_start(voi
 
 celix_status_t bundleActivator_stop(void * userData, BUNDLE_CONTEXT context) {
     celix_status_t status = CELIX_SUCCESS;
+
+    struct activatorData * data = (struct activatorData *) userData;
+    serviceRegistration_unregister(data->reg);
+
     return status;
 }
 

Modified: incubator/celix/trunk/examples/whiteboard/publisherB/activator.c
URL: 
http://svn.apache.org/viewvc/incubator/celix/trunk/examples/whiteboard/publisherB/activator.c?rev=1214685&r1=1214684&r2=1214685&view=diff
==============================================================================
--- incubator/celix/trunk/examples/whiteboard/publisherB/activator.c (original)
+++ incubator/celix/trunk/examples/whiteboard/publisherB/activator.c Thu Dec 15 
10:12:04 2011
@@ -27,10 +27,13 @@
 #include "bundle_activator.h"
 #include "bundle_context.h"
 #include "publisher_private.h"
+#include "service_registration.h"
 
 struct activatorData {
        PUBLISHER_SERVICE ps;
        PUBLISHER pub;
+
+       SERVICE_REGISTRATION reg;
 };
 
 celix_status_t bundleActivator_create(BUNDLE_CONTEXT context, void **userData) 
{
@@ -54,12 +57,12 @@ celix_status_t bundleActivator_start(voi
         data->pub = apr_pcalloc(pool, sizeof(*(data->pub)));
         data->ps->invoke = publisher_invoke;
         data->ps->publisher = data->pub;
+        data->reg = NULL;
 
         PROPERTIES props = properties_create();
                properties_set(props, "id", "B");
 
-       SERVICE_REGISTRATION service_registration = NULL;
-       bundleContext_registerService(context, PUBLISHER_NAME, data->ps, props, 
&service_registration);
+       bundleContext_registerService(context, PUBLISHER_NAME, data->ps, props, 
&data->reg);
     } else {
         status = CELIX_START_ERROR;
     }
@@ -68,6 +71,10 @@ celix_status_t bundleActivator_start(voi
 
 celix_status_t bundleActivator_stop(void * userData, BUNDLE_CONTEXT context) {
     celix_status_t status = CELIX_SUCCESS;
+
+    struct activatorData * data = (struct activatorData *) userData;
+       serviceRegistration_unregister(data->reg);
+
     return status;
 }
 


Reply via email to