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] [Resolved] (CELIX-216) Replace strtok with strtok_r
Date Mon, 09 Feb 2015 12:16:35 GMT

     [ https://issues.apache.org/jira/browse/CELIX-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexander Broekhuis resolved CELIX-216.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: next

Pushed a fix for this.
---------------------------
Author: abroekhuis
Date: Mon Feb  9 12:14:52 2015
New Revision: 1658378

URL: http://svn.apache.org/r1658378
Log:
CELIX-216: Replaced strtok with strtok_r

> Replace strtok with strtok_r
> ----------------------------
>
>                 Key: CELIX-216
>                 URL: https://issues.apache.org/jira/browse/CELIX-216
>             Project: Celix
>          Issue Type: Improvement
>            Reporter: Alexander Broekhuis
>            Assignee: Alexander Broekhuis
>             Fix For: next
>
>
> Currently strtok is used in several places. While on a first inspection this is ok in
most places, there are several side-effects when a function using strtok is called inside
a strtok invocation as well. This is not obvious at first sight, so using strtok is risky
at best.
> To prevent this strtok should be replaced with strtok_r, which provides an API in which
a pointer can be used to keep track of the strtok invocation.
> strtok is used in:
> * launcher.c:123 main
> * discovery
> -- endpoint_discovery_poller.c:93 endpointDiscoveryPoller_create
> * remote_service_admin_http
> -- remote_service_admin_impl.c:394 remoteServiceAdmin_exportService
> -- remote_service_admin_impl.c:400 remoteServiceAdmin_exportService
> -- remote_service_admin_impl.c:402 remoteServiceAdmin_exportService
> * remote_service_admin_shm
> -- remote_service_admin_impl.c:487 remoteServiceAdmin_exportService
> -- remote_service_admin_impl.c:493 remoteServiceAdmin_exportService
> -- remote_service_admin_impl.c:495 remoteServiceAdmin_exportService
> * shell
> -- help_command.c:65 helpCommand_execute
> -- install_command.c:61 installCommand_execute
> -- ps_command.c:67 psCommand_execute
> -- start_command.c:55 startCommand_execute
> -- stop_command.c:56 stopCommand_execute
> -- uninstall_command.c:57 uninstallCommand_execute
> -- update_command.c:63 updateCommand_execute



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

Mime
View raw message