trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject trafficserver git commit: TS-1808: OpenSSL dynlock support formating, license, and include ifdefs
Date Mon, 15 Jun 2015 23:12:43 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 0d9bad62b -> 2c9acad7d


TS-1808: OpenSSL dynlock support
formating, license, and include ifdefs


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

Branch: refs/heads/master
Commit: 2c9acad7dc3ed82e9c463ffd909b648369d43c36
Parents: 0d9bad6
Author: Bryan Call <bcall@apache.org>
Authored: Mon Jun 15 16:12:08 2015 -0700
Committer: Bryan Call <bcall@apache.org>
Committed: Mon Jun 15 16:12:08 2015 -0700

----------------------------------------------------------------------
 iocore/net/SSLDynlock.cc | 41 ++++++++++++++++++++++++++++++-----------
 iocore/net/SSLDynlock.h  | 28 ++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2c9acad7/iocore/net/SSLDynlock.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLDynlock.cc b/iocore/net/SSLDynlock.cc
index daf90b9..4d75efc 100644
--- a/iocore/net/SSLDynlock.cc
+++ b/iocore/net/SSLDynlock.cc
@@ -1,19 +1,36 @@
+/** @file
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
+
 #include "libts.h"
 
-struct CRYPTO_dynlock_value
-{
-  CRYPTO_dynlock_value(const char *f, int l): file(f), line(l) {
-    pthread_mutex_init(&mutex, NULL);
-  }
-  ~CRYPTO_dynlock_value() {
-    pthread_mutex_destroy(&mutex);
-  }
+struct CRYPTO_dynlock_value {
+  CRYPTO_dynlock_value(const char *f, int l) : file(f), line(l) { pthread_mutex_init(&mutex,
NULL); }
+  ~CRYPTO_dynlock_value() { pthread_mutex_destroy(&mutex); }
   const char *file;
   int line;
   pthread_mutex_t mutex;
 };
 
-struct CRYPTO_dynlock_value *ssl_dyn_create_callback(const char *file, int line)
+struct CRYPTO_dynlock_value *
+ssl_dyn_create_callback(const char *file, int line)
 {
   Debug("v_ssl_lock", "file: %s line: %d", file, line);
 
@@ -21,7 +38,8 @@ struct CRYPTO_dynlock_value *ssl_dyn_create_callback(const char *file, int
line)
   return value;
 }
 
-void ssl_dyn_lock_callback(int mode, struct CRYPTO_dynlock_value *value, const char *file,
int line)
+void
+ssl_dyn_lock_callback(int mode, struct CRYPTO_dynlock_value *value, const char *file, int
line)
 {
   Debug("v_ssl_lock", "file: %s line: %d", file, line);
 
@@ -35,7 +53,8 @@ void ssl_dyn_lock_callback(int mode, struct CRYPTO_dynlock_value *value,
const c
   }
 }
 
-void ssl_dyn_destroy_callback(struct CRYPTO_dynlock_value *value, const char *file, int line)
+void
+ssl_dyn_destroy_callback(struct CRYPTO_dynlock_value *value, const char *file, int line)
 {
   Debug("v_ssl_lock", "file: %s line: %d", file, line);
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2c9acad7/iocore/net/SSLDynlock.h
----------------------------------------------------------------------
diff --git a/iocore/net/SSLDynlock.h b/iocore/net/SSLDynlock.h
index cdf9f49..0f960e1 100644
--- a/iocore/net/SSLDynlock.h
+++ b/iocore/net/SSLDynlock.h
@@ -1,3 +1,31 @@
+/** @file
+
+  A brief file description
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
+
+#ifndef __SSLDYNLOCK_H__
+#define __SSLDYNLOCK_H__
+
 extern struct CRYPTO_dynlock_value *ssl_dyn_create_callback(const char *file, int line);
 extern void ssl_dyn_lock_callback(int mode, struct CRYPTO_dynlock_value *value, const char
*file, int line);
 extern void ssl_dyn_destroy_callback(struct CRYPTO_dynlock_value *value, const char *file,
int line);
+
+#endif


Mime
View raw message