httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1063016 - in /httpd/httpd/trunk/modules/session: mod_session_cookie.c mod_session_crypto.c mod_session_dbd.c
Date Mon, 24 Jan 2011 22:12:25 GMT
Author: sf
Date: Mon Jan 24 22:12:24 2011
New Revision: 1063016

URL: http://svn.apache.org/viewvc?rev=1063016&view=rev
Log:
break some very long lines, no code change

Modified:
    httpd/httpd/trunk/modules/session/mod_session_cookie.c
    httpd/httpd/trunk/modules/session/mod_session_crypto.c
    httpd/httpd/trunk/modules/session/mod_session_dbd.c

Modified: httpd/httpd/trunk/modules/session/mod_session_cookie.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/session/mod_session_cookie.c?rev=1063016&r1=1063015&r2=1063016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/session/mod_session_cookie.c (original)
+++ httpd/httpd/trunk/modules/session/mod_session_cookie.c Mon Jan 24 22:12:24 2011
@@ -67,20 +67,26 @@ static int session_cookie_save(request_r
     /* create RFC2109 compliant cookie */
     if (conf->name_set) {
         if (z->encoded && z->encoded[0]) {
-            ap_cookie_write(r, conf->name, z->encoded, conf->name_attrs, z->maxage,
r->headers_out, r->err_headers_out, NULL);
+            ap_cookie_write(r, conf->name, z->encoded, conf->name_attrs,
+                            z->maxage, r->headers_out, r->err_headers_out,
+                            NULL);
         }
         else {
-            ap_cookie_remove(r, conf->name, conf->name_attrs, r->headers_out, r->err_headers_out,
NULL);
+            ap_cookie_remove(r, conf->name, conf->name_attrs, r->headers_out,
+                             r->err_headers_out, NULL);
         }
     }
 
     /* create RFC2965 compliant cookie */
     if (conf->name2_set) {
         if (z->encoded && z->encoded[0]) {
-            ap_cookie_write2(r, conf->name2, z->encoded, conf->name2_attrs, z->maxage,
r->headers_out, r->err_headers_out, NULL);
+            ap_cookie_write2(r, conf->name2, z->encoded, conf->name2_attrs,
+                             z->maxage, r->headers_out, r->err_headers_out,
+                             NULL);
         }
         else {
-            ap_cookie_remove2(r, conf->name2, conf->name2_attrs, r->headers_out,
r->err_headers_out, NULL);
+            ap_cookie_remove2(r, conf->name2, conf->name2_attrs,
+                              r->headers_out, r->err_headers_out, NULL);
         }
     }
 
@@ -172,9 +178,11 @@ static void *create_session_cookie_dir_c
     return (void *) new;
 }
 
-static void *merge_session_cookie_dir_config(apr_pool_t * p, void *basev, void *addv)
+static void *merge_session_cookie_dir_config(apr_pool_t * p, void *basev,
+                                             void *addv)
 {
-    session_cookie_dir_conf *new = (session_cookie_dir_conf *) apr_pcalloc(p, sizeof(session_cookie_dir_conf));
+    session_cookie_dir_conf *new = (session_cookie_dir_conf *)
+                                apr_pcalloc(p, sizeof(session_cookie_dir_conf));
     session_cookie_dir_conf *add = (session_cookie_dir_conf *) addv;
     session_cookie_dir_conf *base = (session_cookie_dir_conf *) basev;
 
@@ -204,7 +212,8 @@ static const char *check_string(cmd_parm
     return NULL;
 }
 
-static const char *set_cookie_name(cmd_parms * cmd, void *config, const char *args)
+static const char *set_cookie_name(cmd_parms * cmd, void *config,
+                                   const char *args)
 {
     char *last;
     char *line = apr_pstrdup(cmd->pool, args);
@@ -219,7 +228,8 @@ static const char *set_cookie_name(cmd_p
     return check_string(cmd, cookie);
 }
 
-static const char *set_cookie_name2(cmd_parms * cmd, void *config, const char *args)
+static const char *set_cookie_name2(cmd_parms * cmd, void *config,
+                                    const char *args)
 {
     char *last;
     char *line = apr_pstrdup(cmd->pool, args);

Modified: httpd/httpd/trunk/modules/session/mod_session_crypto.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/session/mod_session_crypto.c?rev=1063016&r1=1063015&r2=1063016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/session/mod_session_crypto.c (original)
+++ httpd/httpd/trunk/modules/session/mod_session_crypto.c Mon Jan 24 22:12:24 2011
@@ -77,7 +77,11 @@ AP_DECLARE(int) ap_session_crypto_init(a
  *
  * Returns APR_SUCCESS if successful.
  */
-static apr_status_t crypt_init(request_rec * r, const apr_crypto_driver_t *driver, apr_crypto_t
**f, apr_crypto_key_t **key, apr_uuid_t *salt, apr_size_t *ivSize, session_crypto_dir_conf
* dconf)
+static apr_status_t crypt_init(request_rec * r,
+                               const apr_crypto_driver_t *driver,
+                               apr_crypto_t **f, apr_crypto_key_t **key,
+                               apr_uuid_t *salt, apr_size_t *ivSize,
+                               session_crypto_dir_conf * dconf)
 {
     apr_status_t res;
 
@@ -110,8 +114,8 @@ static apr_status_t crypt_init(request_r
         res = apr_crypto_passphrase(r->pool, *f, dconf->passphrase,
 #endif
                 strlen(dconf->passphrase),
-                (unsigned char *) salt, salt ? sizeof(apr_uuid_t) : 0, dconf->cipher,
-                MODE_CBC, 1, 4096, key, ivSize);
+                (unsigned char *) salt, salt ? sizeof(apr_uuid_t) : 0,
+                dconf->cipher, MODE_CBC, 1, 4096, key, ivSize);
     }
 
     if (APR_STATUS_IS_ENOKEY(res)) {
@@ -141,9 +145,10 @@ static apr_status_t crypt_init(request_r
  *
  * Returns APR_SUCCESS if successful.
  */
-static apr_status_t encrypt_string(request_rec * r, const apr_crypto_driver_t *driver,
-        session_crypto_dir_conf *dconf,
-        const char *in, char **out)
+static apr_status_t encrypt_string(request_rec * r,
+                                   const apr_crypto_driver_t *driver,
+                                   session_crypto_dir_conf *dconf,
+                                   const char *in, char **out)
 {
     apr_status_t res;
     apr_crypto_t *f = NULL;
@@ -217,8 +222,11 @@ static apr_status_t encrypt_string(reque
     memcpy(combined + sizeof(apr_uuid_t) + ivSize, encrypt, encryptlen);
 
     /* base64 encode the result */
-    base64 = apr_palloc(r->pool, apr_base64_encode_len(ivSize + encryptlen + sizeof(apr_uuid_t)
+ 1) * sizeof(char));
-    apr_base64_encode(base64, (const char *) combined, ivSize + encryptlen + sizeof(apr_uuid_t));
+    base64 = apr_palloc(r->pool, apr_base64_encode_len(ivSize + encryptlen +
+                                                       sizeof(apr_uuid_t) + 1)
+                                 * sizeof(char));
+    apr_base64_encode(base64, (const char *) combined,
+                      ivSize + encryptlen + sizeof(apr_uuid_t));
     *out = base64;
 
     return res;
@@ -230,9 +238,10 @@ static apr_status_t encrypt_string(reque
  *
  * Returns APR_SUCCESS if successful.
  */
-static apr_status_t decrypt_string(request_rec * r, const apr_crypto_driver_t *driver,
-        session_crypto_dir_conf *dconf,
-        const char *in, char **out)
+static apr_status_t decrypt_string(request_rec * r,
+                                   const apr_crypto_driver_t *driver,
+                                   session_crypto_dir_conf *dconf,
+                                   const char *in, char **out)
 {
     apr_status_t res;
     apr_crypto_t *f = NULL;
@@ -360,7 +369,8 @@ AP_DECLARE(int) ap_session_crypto_decode
             &session_crypto_module);
 
     if ((dconf->passphrase_set) && z->encoded && *z->encoded) {
-        apr_pool_userdata_get((void **)&driver, DRIVER_KEY, r->server->process->pconf);
+        apr_pool_userdata_get((void **)&driver, DRIVER_KEY,
+                              r->server->process->pconf);
         res = decrypt_string(r, driver, dconf, z->encoded, &encoded);
         if (res != APR_SUCCESS) {
             ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, LOG_PREFIX

Modified: httpd/httpd/trunk/modules/session/mod_session_dbd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/session/mod_session_dbd.c?rev=1063016&r1=1063015&r2=1063016&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/session/mod_session_dbd.c (original)
+++ httpd/httpd/trunk/modules/session/mod_session_dbd.c Mon Jan 24 22:12:24 2011
@@ -251,7 +251,8 @@ static int session_dbd_load(request_rec 
 /**
  * Save the session by the key specified.
  */
-static apr_status_t dbd_save(request_rec * r, const char *key, const char *val, apr_int64_t
expiry)
+static apr_status_t dbd_save(request_rec * r, const char *key, const char *val,
+                             apr_int64_t expiry)
 {
 
     apr_status_t rv;
@@ -352,11 +353,13 @@ static apr_status_t dbd_remove(request_r
         return APR_EGENERAL;
     }
 
-    statement = apr_hash_get(dbd->prepared, conf->deletelabel, APR_HASH_KEY_STRING);
+    statement = apr_hash_get(dbd->prepared, conf->deletelabel,
+                             APR_HASH_KEY_STRING);
     if (statement == NULL) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
                       "prepared statement could not be found for "
-                      "SessionDBDdeletelabel with the label '%s'", conf->deletelabel);
+                      "SessionDBDdeletelabel with the label '%s'",
+                      conf->deletelabel);
         return APR_EGENERAL;
     }
     rv = apr_dbd_pvbquery(dbd->driver, r->pool, dbd->handle, &rows, statement,
@@ -431,12 +434,14 @@ static int session_dbd_save(request_rec 
 
         /* create RFC2109 compliant cookie */
         if (conf->name_set) {
-            ap_cookie_write(r, conf->name, buffer, conf->name_attrs, z->maxage,
r->headers_out, r->err_headers_out, NULL);
+            ap_cookie_write(r, conf->name, buffer, conf->name_attrs, z->maxage,
+                            r->headers_out, r->err_headers_out, NULL);
         }
 
         /* create RFC2965 compliant cookie */
         if (conf->name2_set) {
-            ap_cookie_write2(r, conf->name2, buffer, conf->name2_attrs, z->maxage,
r->headers_out, r->err_headers_out, NULL);
+            ap_cookie_write2(r, conf->name2, buffer, conf->name2_attrs, z->maxage,
+                             r->headers_out, r->err_headers_out, NULL);
         }
 
         return OK;



Mime
View raw message