You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2014/07/14 20:10:16 UTC

[01/11] git commit: TS-1475: fix clang warning

Repository: trafficserver
Updated Branches:
  refs/heads/master f18ce72e9 -> ed4a8e741


TS-1475: fix clang warning


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

Branch: refs/heads/master
Commit: ed4a8e741f8cc7062079700426551aaaacc88312
Parents: 63ddfac
Author: Justin Laue <ju...@fp-x.com>
Authored: Mon Jul 14 11:50:18 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 12:09:57 2014 -0600

----------------------------------------------------------------------
 iocore/net/Socks.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ed4a8e74/iocore/net/Socks.cc
----------------------------------------------------------------------
diff --git a/iocore/net/Socks.cc b/iocore/net/Socks.cc
index 88b22e5..59f9d5f 100644
--- a/iocore/net/Socks.cc
+++ b/iocore/net/Socks.cc
@@ -155,7 +155,7 @@ SocksEntry::free()
     netVConnection->do_io_close();
 
   if (!action_.cancelled) {
-    if (lerrno) {
+    if (lerrno || !netVConnection) {
       Debug("Socks", "retryevent: Sent errno %d to HTTP", lerrno);
       NET_INCREMENT_DYN_STAT(socks_connections_unsuccessful_stat);
       action_.continuation->handleEvent(NET_EVENT_OPEN_FAILED, (void *)(intptr_t)(-lerrno));


[04/11] git commit: TS-1475: fix clang warnings

Posted by so...@apache.org.
TS-1475: fix clang warnings


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

Branch: refs/heads/master
Commit: 72892e2d6f6edf85bfa746e19deab9a6fe6bd62c
Parents: f18ce72
Author: JvD <ja...@cable.comcast.com>
Authored: Mon Jul 14 10:22:18 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 12:09:57 2014 -0600

----------------------------------------------------------------------
 mgmt/api/APITestCliRemote.cc | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/72892e2d/mgmt/api/APITestCliRemote.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/APITestCliRemote.cc b/mgmt/api/APITestCliRemote.cc
index 115dea8..6997605 100644
--- a/mgmt/api/APITestCliRemote.cc
+++ b/mgmt/api/APITestCliRemote.cc
@@ -376,6 +376,7 @@ print_cache_ele(TSCacheEle * ele)
 {
   if (!ele) {
     printf("can't print ele\n");
+    return;
   }
 
   char *pd_str, *time_str;
@@ -446,6 +447,7 @@ print_hosting_ele(TSHostingEle * ele)
 {
   if (!ele) {
     printf("can't print ele\n");
+    return;
   }
 
   switch (ele->pd_type) {
@@ -477,6 +479,7 @@ print_icp_ele(TSIcpEle * ele)
 {
   if (!ele) {
     printf("can't print ele\n");
+    return;
   }
 
   int peer_type;
@@ -508,6 +511,7 @@ print_ip_allow_ele(TSIpAllowEle * ele)
 {
   if (!ele) {
     printf("can't print ele\n");
+    return;
   }
 
   print_ip_addr_ele(ele->src_ip_addr);
@@ -518,6 +522,7 @@ print_parent_ele(TSParentProxyEle * ele)
 {
   if (!ele) {
     printf("can't print ele\n");
+    return;
   }
 
   printf("parent rule type: %d\n", ele->cfg_ele.type);
@@ -533,6 +538,7 @@ print_volume_ele(TSVolumeEle * ele)
 {
   if (!ele) {
     printf("can't print ele\n");
+    return;
   }
 
   printf("volume #: %d\n", ele->volume_num);
@@ -556,6 +562,7 @@ print_plugin_ele(TSPluginEle * ele)
 {
   if (!ele) {
     printf("can't print plugin ele\n");
+    return;
   }
 
   printf("name: %s\t\t", ele->name);
@@ -572,6 +579,7 @@ print_remap_ele(TSRemapEle * ele)
 {
   if (!ele) {
     printf("can't print ele\n");
+    return;
   }
 
   char buf[MAX_BUF_SIZE];
@@ -751,6 +759,7 @@ print_storage_ele(TSStorageEle * ele)
 {
   if (!ele) {
     printf("can't print ele\n");
+    return;
   }
 
   if (ele->pathname)
@@ -762,6 +771,7 @@ print_update_ele(TSUpdateEle * ele)
 {
   if (!ele) {
     printf("can't print ele\n");
+    return;
   }
 
   printf("url: %s\n", ele->url);


[08/11] git commit: TS-1475: fix clang warning

Posted by so...@apache.org.
TS-1475: fix clang warning


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

Branch: refs/heads/master
Commit: d219583a4b586a06d70014edb3290480db0c3745
Parents: 5cdcb98
Author: Phil Sorber <so...@apache.org>
Authored: Mon Jul 14 10:51:29 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 12:09:57 2014 -0600

----------------------------------------------------------------------
 proxy/logging/LogBuffer.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d219583a/proxy/logging/LogBuffer.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogBuffer.cc b/proxy/logging/LogBuffer.cc
index bf705d5..c4a3cec 100644
--- a/proxy/logging/LogBuffer.cc
+++ b/proxy/logging/LogBuffer.cc
@@ -175,14 +175,15 @@ LogBuffer::LogBuffer(LogObject * owner, LogBufferHeader * header):
 
 LogBuffer::~LogBuffer()
 {
+  Debug("log-logbuffer", "[%p] Deleting buffer %u at address %p",
+        this_ethread(), m_id, m_unaligned_buffer ? m_unaligned_buffer : m_buffer);
+
   if (m_unaligned_buffer) {
     delete [] m_unaligned_buffer;
   } else {
     delete [] m_buffer;
   }
 
-  Debug("log-logbuffer", "[%p] Deleted buffer %u at address %p",
-        this_ethread(), m_id, m_unaligned_buffer ? m_unaligned_buffer : m_buffer);
   m_buffer = 0;
   m_unaligned_buffer = 0;
 }


[09/11] git commit: TS-1475: fix clang warnings - init towrite to 0

Posted by so...@apache.org.
TS-1475: fix clang warnings - init towrite to 0


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

Branch: refs/heads/master
Commit: 3ba2100250f56d4d276875cf74b6825a15379944
Parents: b392843
Author: JvD <ja...@cable.comcast.com>
Authored: Mon Jul 14 11:21:48 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 12:09:57 2014 -0600

----------------------------------------------------------------------
 example/thread-pool/psi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3ba21002/example/thread-pool/psi.c
----------------------------------------------------------------------
diff --git a/example/thread-pool/psi.c b/example/thread-pool/psi.c
index 24fef91..1860d8e 100644
--- a/example/thread-pool/psi.c
+++ b/example/thread-pool/psi.c
@@ -615,7 +615,7 @@ handle_transform(TSCont contp)
   TSVIO input_vio;
   ContData *data;
   TSIOBufferReader input_reader;
-  int toread, avail, psi, toconsume, towrite;
+  int toread, avail, psi, toconsume, towrite = 0;
 
   /* Get the output (downstream) vconnection where we'll write data to. */
   output_conn = TSTransformOutputVConnGet(contp);


[07/11] git commit: TS-1475: immediately initalize core_obj PluginVC constructor

Posted by so...@apache.org.
TS-1475: immediately initalize core_obj PluginVC constructor


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

Branch: refs/heads/master
Commit: b392843eed5f4286693d3932119fb2a551b68022
Parents: 3b15cc0
Author: Justin Laue <ju...@fp-x.com>
Authored: Mon Jul 14 11:19:56 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 12:09:57 2014 -0600

----------------------------------------------------------------------
 proxy/PluginVC.cc | 10 +++++-----
 proxy/PluginVC.h  |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b392843e/proxy/PluginVC.cc
----------------------------------------------------------------------
diff --git a/proxy/PluginVC.cc b/proxy/PluginVC.cc
index 16eb5a2..d01a1d4 100644
--- a/proxy/PluginVC.cc
+++ b/proxy/PluginVC.cc
@@ -46,7 +46,7 @@
    sides, in additional this VC's lock.  Additionally, issues like
    watermarks are very hard to deal with.  Since we try to
    to move data by IOBufferData references the efficiency penalty shouldn't
-   be too bad and if it is a big pentaly, a brave soul can reimplement
+   be too bad and if it is a big penalty, a brave soul can reimplement
    to move the data directly without the intermediate buffer.
 
    Locking is difficult issue for this multi-headed beast.  In each
@@ -54,7 +54,7 @@
    the lock from the state machine using the PluginVC.  The read side
    lock & the write side lock must be the same.  The regular net processor has
    this constraint as well.  In order to handle scheduling of retry events cleanly,
-   we have two event poitners, one for each lock.  sm_lock_retry_event can only
+   we have two event pointers, one for each lock.  sm_lock_retry_event can only
    be changed while holding the using state machine's lock and
    core_lock_retry_event can only be manipulated while holding the PluginVC's
    lock.  On entry to PluginVC::main_handler, we obtain all the locks
@@ -64,7 +64,7 @@
    exclusively in the later parts of the handler and we will
    be free from do_io or reenable calls on the PluginVC.
 
-   The assumption is made (conistant with IO Core spec) that any close,
+   The assumption is made (consistent with IO Core spec) that any close,
    shutdown, reenable, or do_io_{read,write) operation is done by the callee
    while holding the lock for that side of the operation.
 
@@ -86,9 +86,9 @@
 #define PVC_TYPE    ((vc_type == PLUGIN_VC_ACTIVE) ? "Active" : "Passive")
 #define PVC_ID      (core_obj? core_obj->id : (unsigned)-1)
 
-PluginVC::PluginVC():
+PluginVC::PluginVC(PluginVCCore *core_obj):
 NetVConnection(),
-magic(PLUGIN_VC_MAGIC_ALIVE), vc_type(PLUGIN_VC_UNKNOWN), core_obj(NULL),
+magic(PLUGIN_VC_MAGIC_ALIVE), vc_type(PLUGIN_VC_UNKNOWN), core_obj(core_obj),
 other_side(NULL), read_state(), write_state(),
 need_read_process(false), need_write_process(false),
 closed(false), sm_lock_retry_event(NULL), core_lock_retry_event(NULL),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b392843e/proxy/PluginVC.h
----------------------------------------------------------------------
diff --git a/proxy/PluginVC.h b/proxy/PluginVC.h
index 6ee3a93..2389842 100644
--- a/proxy/PluginVC.h
+++ b/proxy/PluginVC.h
@@ -81,7 +81,7 @@ class PluginVC:public NetVConnection, public PluginIdentity
   friend class PluginVCCore;
 public:
 
-    PluginVC();
+    PluginVC(PluginVCCore *core_obj);
    ~PluginVC();
 
   virtual VIO *do_io_read(Continuation * c = NULL, int64_t nbytes = INT64_MAX, MIOBuffer * buf = 0);
@@ -249,8 +249,8 @@ private:
 
 inline
 PluginVCCore::PluginVCCore():
-active_vc(),
-passive_vc(),
+active_vc(this),
+passive_vc(this),
 connect_to(NULL),
 connected(false),
 p_to_a_buffer(NULL),


[05/11] git commit: TS-1475: added return in case Fatal does not bring down the system

Posted by so...@apache.org.
TS-1475: added return in case Fatal does not bring down the system


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

Branch: refs/heads/master
Commit: bdcb06ab752499f940a3565e175ae2a872e339fd
Parents: 72892e2
Author: Justin Laue <ju...@fp-x.com>
Authored: Mon Jul 14 10:23:19 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 12:09:57 2014 -0600

----------------------------------------------------------------------
 proxy/Plugin.cc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bdcb06ab/proxy/Plugin.cc
----------------------------------------------------------------------
diff --git a/proxy/Plugin.cc b/proxy/Plugin.cc
index 0d315b6..0a0be5d 100644
--- a/proxy/Plugin.cc
+++ b/proxy/Plugin.cc
@@ -132,6 +132,7 @@ plugin_load(int argc, char *argv[])
     init = (init_func_t) dll_findsym(handle, "TSPluginInit");
     if (!init) {
       Fatal("unable to find TSPluginInit function '%s': %s", path, dll_error(handle));
+      return; // this line won't get called since Fatal brings down ats
     }
 
     init(argc, argv);


[02/11] git commit: TS-1475: fix clang warning

Posted by so...@apache.org.
TS-1475: fix clang warning


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

Branch: refs/heads/master
Commit: ef0a03d437b363df18000ed054e71cf5318f9c80
Parents: 8c494ac
Author: Justin Laue <ju...@fp-x.com>
Authored: Mon Jul 14 11:29:53 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 12:09:57 2014 -0600

----------------------------------------------------------------------
 plugins/experimental/remap_stats/remap_stats.c | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ef0a03d4/plugins/experimental/remap_stats/remap_stats.c
----------------------------------------------------------------------
diff --git a/plugins/experimental/remap_stats/remap_stats.c b/plugins/experimental/remap_stats/remap_stats.c
index 5f55cac..67c62ab 100644
--- a/plugins/experimental/remap_stats/remap_stats.c
+++ b/plugins/experimental/remap_stats/remap_stats.c
@@ -59,6 +59,7 @@ stat_add(char *name, TSMgmtInt amount, TSStatPersistence persist_type, TSMutex c
     }
 
     search.key = name;
+    search.data = 0;
     hsearch_r(search, FIND, &result, &stat_cache);
 
     if (unlikely(result == NULL))


[03/11] git commit: TS-1475: fix clang warnings - only 0 if allocated

Posted by so...@apache.org.
TS-1475: fix clang warnings - only 0 if allocated


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

Branch: refs/heads/master
Commit: 3b15cc005b4c5f9bd8fc509d19cd25b56b8fbe61
Parents: d219583
Author: JvD <ja...@cable.comcast.com>
Authored: Mon Jul 14 11:02:10 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 12:09:57 2014 -0600

----------------------------------------------------------------------
 tools/jtest/jtest.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3b15cc00/tools/jtest/jtest.cc
----------------------------------------------------------------------
diff --git a/tools/jtest/jtest.cc b/tools/jtest/jtest.cc
index 168ddfe..2c4eb21 100644
--- a/tools/jtest/jtest.cc
+++ b/tools/jtest/jtest.cc
@@ -413,7 +413,8 @@ struct FD {
     length = 0;
     if (!urls_mode)
       response = NULL;
-    response_header[0] = 0;
+    if (response_header)
+      response_header[0] = 0;
     response_length = 0;
     response_remaining = 0;
     count = NULL;


[11/11] git commit: TS-1475: fix clang warning

Posted by so...@apache.org.
TS-1475: fix clang warning


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

Branch: refs/heads/master
Commit: 8c494ac543c79813f91c5007fcd78341545632fd
Parents: 3ba2100
Author: Phil Sorber <so...@apache.org>
Authored: Mon Jul 14 11:26:01 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 12:09:57 2014 -0600

----------------------------------------------------------------------
 proxy/Prefetch.cc | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8c494ac5/proxy/Prefetch.cc
----------------------------------------------------------------------
diff --git a/proxy/Prefetch.cc b/proxy/Prefetch.cc
index c1d2b95..b27acc4 100644
--- a/proxy/Prefetch.cc
+++ b/proxy/Prefetch.cc
@@ -547,29 +547,26 @@ PrefetchTransform::redirect(HTTPHdr *resp)
    */
   if ((resp != NULL) && (resp->valid())) {
     response_status = resp->status_get();
-  } else {
-    response_status = -1;
-  }
 
-  /* OK, so we got the response. Now if the response is a redirect we have to check if we also
-     got a Location: header. This indicates the new location where our object is located.
-     If refirect_url was not found, letz falter back to just a recursion. Since
-     we might find the url in the body.
-   */
-  if (resp->presence(MIME_PRESENCE_LOCATION)) {
-    int redirect_url_len = 0;
-    const char *tmp_url = resp->value_get(MIME_FIELD_LOCATION, MIME_LEN_LOCATION, &redirect_url_len);
+    /* OK, so we got the response. Now if the response is a redirect we have to check if we also
+       got a Location: header. This indicates the new location where our object is located.
+       If refirect_url was not found, letz falter back to just a recursion. Since
+       we might find the url in the body.
+     */
+    if (resp->presence(MIME_PRESENCE_LOCATION)) {
+      int redirect_url_len = 0;
+      const char *tmp_url = resp->value_get(MIME_FIELD_LOCATION, MIME_LEN_LOCATION, &redirect_url_len);
 
-    redirect_url = (char *)alloca(redirect_url_len + 1);
-    ink_strlcpy(redirect_url, tmp_url, redirect_url_len + 1);
-    Debug("PrefetchTransform", "redirect_url = %s\n", redirect_url);
+      redirect_url = (char *)alloca(redirect_url_len + 1);
+      ink_strlcpy(redirect_url, tmp_url, redirect_url_len + 1);
+      Debug("PrefetchTransform", "redirect_url = %s\n", redirect_url);
+    } else {
+      response_status = -1;
+    }
   } else {
     response_status = -1;
   }
 
-
-
-
   if (IS_STATUS_REDIRECT(response_status)) {
     if (redirect_url) {
 


[06/11] git commit: TS-1475 - check to end loop if disks_left==0; shouldn't happen

Posted by so...@apache.org.
TS-1475 - check to end loop if disks_left==0; shouldn't happen


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

Branch: refs/heads/master
Commit: 5cdcb98b23a103aa590fbc394d8f1fb276bcfa59
Parents: bdcb06a
Author: Justin Laue <ju...@fp-x.com>
Authored: Mon Jul 14 10:45:32 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 12:09:57 2014 -0600

----------------------------------------------------------------------
 iocore/cache/Store.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5cdcb98b/iocore/cache/Store.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Store.cc b/iocore/cache/Store.cc
index 788ad11..e1d850f 100644
--- a/iocore/cache/Store.cc
+++ b/iocore/cache/Store.cc
@@ -909,7 +909,7 @@ Store::spread_alloc(Store & s, unsigned int blocks, bool mmapable)
 
   int disks_left = spread_over;
 
-  for (unsigned i = 0; blocks && i < n_disks; i++) {
+  for (unsigned i = 0; blocks && disks_left && i < n_disks; i++) {
     if (!(mmapable && !disk[i]->is_mmapable())) {
       unsigned int target = blocks / disks_left;
       if (blocks - target > total_blocks(i + 1))


[10/11] git commit: TS-1475: fix clang warnings - init to example vals if no & found

Posted by so...@apache.org.
TS-1475: fix clang warnings - init to example vals if no & found


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

Branch: refs/heads/master
Commit: 63ddfac055b904895821574bcea2127411e04565
Parents: ef0a03d
Author: JvD <ja...@cable.comcast.com>
Authored: Mon Jul 14 11:43:16 2014 -0600
Committer: Phil Sorber <so...@apache.org>
Committed: Mon Jul 14 12:09:57 2014 -0600

----------------------------------------------------------------------
 example/secure-link/secure-link.c | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/63ddfac0/example/secure-link/secure-link.c
----------------------------------------------------------------------
diff --git a/example/secure-link/secure-link.c b/example/secure-link/secure-link.c
index cefc74f..6af254d 100644
--- a/example/secure-link/secure-link.c
+++ b/example/secure-link/secure-link.c
@@ -76,6 +76,11 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo* rri)
           break;
         }
       } while((ptr = strtok(NULL, "&")) != NULL);
+    } else {
+      TSError("strtok didn't find a & in the query string");
+      /* this is just example, so set fake params to prevent plugin crash */
+      token = TSstrdup("d41d8cd98f00b204e9800998ecf8427e");
+      expire = TSstrdup("00000000");
     }
     TSfree(s);
   } else {