You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2016/01/25 19:01:57 UTC
[41/51] celix git commit: CELIX-341: add missing return value check
CELIX-341: add missing return value check
Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/79235f0c
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/79235f0c
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/79235f0c
Branch: refs/heads/feature/CELIX-335_deploy_refactoring
Commit: 79235f0cd87dc948d8aaa21c7d03e30ed6cf1b30
Parents: 5403908
Author: Bjoern Petri <bp...@apache.org>
Authored: Sat Jan 16 11:14:58 2016 +0100
Committer: Bjoern Petri <bp...@apache.org>
Committed: Sat Jan 16 11:14:58 2016 +0100
----------------------------------------------------------------------
shell/private/src/log_command.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/celix/blob/79235f0c/shell/private/src/log_command.c
----------------------------------------------------------------------
diff --git a/shell/private/src/log_command.c b/shell/private/src/log_command.c
index a1f77c1..8b0244a 100644
--- a/shell/private/src/log_command.c
+++ b/shell/private/src/log_command.c
@@ -34,10 +34,11 @@
celix_status_t logCommand_levelAsString(bundle_context_pt context, log_level_t level, char **string);
void logCommand_execute(bundle_context_pt context, char *line, FILE *outStream, FILE *errStream) {
+ celix_status_t status;
service_reference_pt readerService = NULL;
- bundleContext_getServiceReference(context, (char *) OSGI_LOGSERVICE_READER_SERVICE_NAME, &readerService);
- if (readerService != NULL) {
+ status = bundleContext_getServiceReference(context, (char *) OSGI_LOGSERVICE_READER_SERVICE_NAME, &readerService);
+ if (status != CELIX_SUCCESS || readerService != NULL) {
linked_list_pt list = NULL;
linked_list_iterator_pt iter = NULL;
log_reader_service_pt reader = NULL;