[
https://issues.apache.org/jira/browse/CELIX-253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Erjan Altena updated CELIX-253:
-------------------------------
Attachment: patch
> Deployment admin does not always download the latest version from ACE
> ---------------------------------------------------------------------
>
> Key: CELIX-253
> URL: https://issues.apache.org/jira/browse/CELIX-253
> Project: Celix
> Issue Type: Bug
> Components: Deployment Admin
> Reporter: Erjan Altena
> Attachments: patch
>
>
> The deployment admin does not download a new version from ACE when the
> deployment version increases from 9.0.0. -> 10.0.0
> (and probably also 99.0.0 -> 100.0.0 etc)
> The cause is the strcmp in the deployment_admin.c:
> if (admin->current == NULL || strcmp(last, admin->current) > 0)
> The patch:
> -------------------------
> diff --git a/deployment_admin/private/src/deployment_admin.c
> b/deployment_admin/private/src/deployment_admin.c
> index 6ef80dc..29dd0ff 100644
> --- a/deployment_admin/private/src/deployment_admin.c
> +++ b/deployment_admin/private/src/deployment_admin.c
> @@ -217,7 +217,7 @@ static void *deploymentAdmin_poll(void *deploymentAdmin) {
> char *last = arrayList_get(versions, arrayList_size(versions)
> - 1);
>
> if (last != NULL) {
> - if (admin->current == NULL || strcmp(last,
> admin->current) > 0) {
> + if (admin->current == NULL || strcmp(last,
> admin->current) != 0) {
> int length = strlen(admin->pollUrl) +
> strlen(last) + 2;
> char request[length];
> if (admin->current == NULL) {
> --------------------------
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)