celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject celix git commit: CELIX-314: disable curl signal handlers
Date Tue, 01 Dec 2015 19:29:31 GMT
Repository: celix
Updated Branches:
  refs/heads/develop 8a0ee2603 -> c9eabe8a2


CELIX-314: disable curl signal handlers


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/c9eabe8a
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/c9eabe8a
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/c9eabe8a

Branch: refs/heads/develop
Commit: c9eabe8a2c43f8fce013a72c3a8c16bebc19d09c
Parents: 8a0ee26
Author: Bjoern Petri <bpetri@apache.org>
Authored: Tue Dec 1 20:27:52 2015 +0100
Committer: Bjoern Petri <bpetri@apache.org>
Committed: Tue Dec 1 20:27:52 2015 +0100

----------------------------------------------------------------------
 deployment_admin/private/src/deployment_admin.c                   | 3 +++
 deployment_admin/private/src/log_sync.c                           | 1 +
 remote_services/discovery/private/src/endpoint_discovery_poller.c | 1 +
 remote_services/discovery_etcd/private/src/etcd.c                 | 1 +
 .../rsa/private/src/remote_service_admin_dfi.c                    | 1 +
 .../private/src/remote_service_admin_impl.c                       | 1 +
 shell/private/src/update_command.c                                | 1 +
 7 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/c9eabe8a/deployment_admin/private/src/deployment_admin.c
----------------------------------------------------------------------
diff --git a/deployment_admin/private/src/deployment_admin.c b/deployment_admin/private/src/deployment_admin.c
index 200def4..a0b8cea 100644
--- a/deployment_admin/private/src/deployment_admin.c
+++ b/deployment_admin/private/src/deployment_admin.c
@@ -194,6 +194,7 @@ static celix_status_t deploymentAdmin_performRequest(deployment_admin_pt
admin,
     sprintf(url, "%s/send", admin->auditlogUrl);
 
     if (status == CELIX_SUCCESS) {
+            curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1)
             curl_easy_setopt(curl, CURLOPT_URL, url);
             curl_easy_setopt(curl, CURLOPT_POSTFIELDS, entry);
             res = curl_easy_perform(curl);
@@ -392,6 +393,7 @@ celix_status_t deploymentAdmin_readVersions(deployment_admin_pt admin,
array_lis
 	chunk.memory = calloc(1, sizeof(char));
 	chunk.size = 0;
 	if (curl) {
+	    curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1)
 		curl_easy_setopt(curl, CURLOPT_URL, admin->pollUrl);
 		curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, deploymentAdmin_parseVersions);
 		curl_easy_setopt(curl, CURLOPT_WRITEDATA, &chunk);
@@ -437,6 +439,7 @@ celix_status_t deploymentAdmin_download(deployment_admin_pt admin, char
* url, c
         int fd = mkstemp(*inputFile);
         if (fd != -1) {
             FILE *fp = fopen(*inputFile, "wb+");
+            curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1)
             curl_easy_setopt(curl, CURLOPT_URL, url);
             curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, deploymentAdmin_writeData);
             curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);

http://git-wip-us.apache.org/repos/asf/celix/blob/c9eabe8a/deployment_admin/private/src/log_sync.c
----------------------------------------------------------------------
diff --git a/deployment_admin/private/src/log_sync.c b/deployment_admin/private/src/log_sync.c
index 472c59e..94fce98 100644
--- a/deployment_admin/private/src/log_sync.c
+++ b/deployment_admin/private/src/log_sync.c
@@ -166,6 +166,7 @@ celix_status_t logSync_queryLog(log_sync_pt logSync, char *targetId, long
logId,
 	chunk.memory = calloc(1, sizeof(char));
 	chunk.size = 0;
 	if (curl) {
+	    curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1)
 		curl_easy_setopt(curl, CURLOPT_URL, query);
 		curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, logSync_readQeury);
 		curl_easy_setopt(curl, CURLOPT_WRITEDATA, &chunk);

http://git-wip-us.apache.org/repos/asf/celix/blob/c9eabe8a/remote_services/discovery/private/src/endpoint_discovery_poller.c
----------------------------------------------------------------------
diff --git a/remote_services/discovery/private/src/endpoint_discovery_poller.c b/remote_services/discovery/private/src/endpoint_discovery_poller.c
index d2f347c..fe31f93 100644
--- a/remote_services/discovery/private/src/endpoint_discovery_poller.c
+++ b/remote_services/discovery/private/src/endpoint_discovery_poller.c
@@ -359,6 +359,7 @@ static celix_status_t endpointDiscoveryPoller_getEndpoints(endpoint_discovery_po
         status = CELIX_ILLEGAL_STATE;
     } else {
         curl_easy_setopt(curl, CURLOPT_URL, url);
+        curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1)
         curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, endpointDiscoveryPoller_writeMemory);
         curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
         curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 5L);

http://git-wip-us.apache.org/repos/asf/celix/blob/c9eabe8a/remote_services/discovery_etcd/private/src/etcd.c
----------------------------------------------------------------------
diff --git a/remote_services/discovery_etcd/private/src/etcd.c b/remote_services/discovery_etcd/private/src/etcd.c
index e298ae4..6f1bbec 100644
--- a/remote_services/discovery_etcd/private/src/etcd.c
+++ b/remote_services/discovery_etcd/private/src/etcd.c
@@ -79,6 +79,7 @@ static int performRequest(char* url, request_t request, void* callback,
void* re
 	curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
 	curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, callback);
 	curl_easy_setopt(curl, CURLOPT_WRITEDATA, repData);
+	curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1)
 
 	if (request == PUT) {
 		curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT");

http://git-wip-us.apache.org/repos/asf/celix/blob/c9eabe8a/remote_services/remote_service_admin_dfi/rsa/private/src/remote_service_admin_dfi.c
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_dfi/rsa/private/src/remote_service_admin_dfi.c
b/remote_services/remote_service_admin_dfi/rsa/private/src/remote_service_admin_dfi.c
index a51795b..583a347 100644
--- a/remote_services/remote_service_admin_dfi/rsa/private/src/remote_service_admin_dfi.c
+++ b/remote_services/remote_service_admin_dfi/rsa/private/src/remote_service_admin_dfi.c
@@ -703,6 +703,7 @@ static celix_status_t remoteServiceAdmin_send(void *handle, endpoint_description
     if(!curl) {
         status = CELIX_ILLEGAL_STATE;
     } else {
+        curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1)
         curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
         curl_easy_setopt(curl, CURLOPT_URL, &url[0]);
         curl_easy_setopt(curl, CURLOPT_POST, 1L);

http://git-wip-us.apache.org/repos/asf/celix/blob/c9eabe8a/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
----------------------------------------------------------------------
diff --git a/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
b/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
index b14b542..a39aa01 100644
--- a/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
+++ b/remote_services/remote_service_admin_http/private/src/remote_service_admin_impl.c
@@ -764,6 +764,7 @@ celix_status_t remoteServiceAdmin_send(remote_service_admin_pt rsa, endpoint_des
 		if (!curl) {
 			status = CELIX_ILLEGAL_STATE;
 		} else {
+		    curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1)
 			curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
 			curl_easy_setopt(curl, CURLOPT_URL, &url[0]);
 			curl_easy_setopt(curl, CURLOPT_POST, 1L);

http://git-wip-us.apache.org/repos/asf/celix/blob/c9eabe8a/shell/private/src/update_command.c
----------------------------------------------------------------------
diff --git a/shell/private/src/update_command.c b/shell/private/src/update_command.c
index d5d4cd7..5e4c440 100644
--- a/shell/private/src/update_command.c
+++ b/shell/private/src/update_command.c
@@ -83,6 +83,7 @@ celix_status_t updateCommand_download(bundle_context_pt context, char *
url, cha
 		if (fd) {
 		    fp = fopen(*inputFile, "wb+");
             printf("Temp file: %s\n", *inputFile);
+            curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1)
             curl_easy_setopt(curl, CURLOPT_URL, url);
             curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, updateCommand_writeData);
             curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);


Mime
View raw message