[
https://issues.apache.org/jira/browse/AXIS2C-1142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Nairn updated AXIS2C-1142:
--------------------------------
Attachment: http_common.patch
The attached patch against r656580 of trunk) contains a proposed solution to
the circular dependency problem.
The engine library only depends on the axis2_http_header_free() and
axis2_http_accept_record_free() functions defined in the http_common library.
The functions free up axis2_http_header_t and axis2_http_accept_record_t
structures respectively.
The proposed solution is to change the way these structures are created so that
they can simply be freed by the AXIS2_FREE macro.
The axis2_http_header_t structure contains two pointers to strings which are
separately allocated. The patch changes this so that enough space is allocated
when creating the structure to store the strings immediately after it (in the
same allocated block).
Similarly, the axis2_http_accept_record_t structure also contains two pointers
to strings which are separately allocated. The patch changes this in the same
way as the above.
This way the axis2_http_header_free() and axis2_http_accept_record_free()
functions are no longer required. To minimise code changes the functions are
replaced by macros of the same names. The macros use a neat hack (copied from
OpenSSL - see http://marc.info/?l=openssl-dev&m=117983173402236&w=2) to ensure
a warning is generated if they are used to free something of the wrong type.
I've tested this on Linux using gcc versions 3.4.6 and 4.2.3 and everything
(seems to) work fine.
> Circular dependency between engine and http_common libraries
> ------------------------------------------------------------
>
> Key: AXIS2C-1142
> URL: https://issues.apache.org/jira/browse/AXIS2C-1142
> Project: Axis2-C
> Issue Type: Bug
> Components: core/engine, core/transport
> Affects Versions: 1.4.0
> Environment: CentOS 4.6 (linux), GCC 3.4.6/4.2.3
> Reporter: Steve Nairn
> Priority: Minor
> Attachments: http_common.patch
>
>
> Following discussion on the Axis2/C dev list, there is a circular dependency
> between libaxis2_engine and libaxis2_http_common.
> The http_common library contains references to a large number of symbols that
> are resolved by the engine library. Unfortunately the engine library contains
> references to axis2_http_accept_record_free and axis2_http_header_free, that
> are resolved by the http_common library. Therefore there is a circular
> dependency between the libraries.
> The circular dependency makes it very difficult to build these libraries on
> platforms that do not allow shared libraries to contain unresolved symbols
> (for example, Windows DLLs).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]