You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/01/14 03:04:53 UTC
[trafficserver] branch master updated: #1323 Restores the NULL
string where appropriate
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 547ac54 #1323 Restores the NULL string where appropriate
547ac54 is described below
commit 547ac54b47dffb3c92baeca021f7ee459009c92c
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Fri Jan 13 08:30:15 2017 -0700
#1323 Restores the NULL string where appropriate
---
lib/records/P_RecCore.cc | 2 +-
lib/records/RecCore.cc | 2 +-
lib/records/RecUtils.cc | 2 +-
lib/ts/Diags.cc | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/records/P_RecCore.cc b/lib/records/P_RecCore.cc
index d796d70..1ad5200 100644
--- a/lib/records/P_RecCore.cc
+++ b/lib/records/P_RecCore.cc
@@ -735,7 +735,7 @@ RecSyncConfigToTB(textBuffer *tb, bool *inc_version)
if (r->data.rec_string) {
tb->copyFrom(r->data.rec_string, strlen(r->data.rec_string));
} else {
- tb->copyFrom("nullptr", strlen("NULL"));
+ tb->copyFrom("NULL", strlen("NULL"));
}
break;
case RECD_COUNTER:
diff --git a/lib/records/RecCore.cc b/lib/records/RecCore.cc
index 5dbf518..71e5fda 100644
--- a/lib/records/RecCore.cc
+++ b/lib/records/RecCore.cc
@@ -996,7 +996,7 @@ debug_record_callback(RecT /* rec_type */, void * /* edata */, int registered, c
RecDebug(DL_Note, " ([%d] '%s', '%f')", registered, name, datum->rec_float);
break;
case RECD_STRING:
- RecDebug(DL_Note, " ([%d] '%s', '%s')", registered, name, datum->rec_string ? datum->rec_string : "nullptr");
+ RecDebug(DL_Note, " ([%d] '%s', '%s')", registered, name, datum->rec_string ? datum->rec_string : "NULL");
break;
case RECD_COUNTER:
RecDebug(DL_Note, " ([%d] '%s', '%" PRId64 "')", registered, name, datum->rec_counter);
diff --git a/lib/records/RecUtils.cc b/lib/records/RecUtils.cc
index b280720..77be0c6 100644
--- a/lib/records/RecUtils.cc
+++ b/lib/records/RecUtils.cc
@@ -419,7 +419,7 @@ RecDataSetFromString(RecDataT data_type, RecData *data_dst, const char *data_str
data_src.rec_float = atof(data_string);
break;
case RECD_STRING:
- if (data_string && strcmp((data_string), "nullptr") == 0) {
+ if (data_string && (strlen(data_string) == 4) && strncmp((data_string), "NULL", 4) == 0) {
data_src.rec_string = nullptr;
} else {
// It's OK to cast away the const here, because RecDataSet will copy the string.
diff --git a/lib/ts/Diags.cc b/lib/ts/Diags.cc
index da8c5f2..18d1236 100644
--- a/lib/ts/Diags.cc
+++ b/lib/ts/Diags.cc
@@ -527,9 +527,9 @@ Diags::dump(FILE *fp) const
fprintf(fp, "Diags:\n");
fprintf(fp, " debug.enabled: %d\n", config.enabled[DiagsTagType_Debug]);
- fprintf(fp, " debug default tags: '%s'\n", (base_debug_tags ? base_debug_tags : "nullptr"));
+ fprintf(fp, " debug default tags: '%s'\n", (base_debug_tags ? base_debug_tags : "NULL"));
fprintf(fp, " action.enabled: %d\n", config.enabled[DiagsTagType_Action]);
- fprintf(fp, " action default tags: '%s'\n", (base_action_tags ? base_action_tags : "nullptr"));
+ fprintf(fp, " action default tags: '%s'\n", (base_action_tags ? base_action_tags : "NULL"));
fprintf(fp, " outputs:\n");
for (i = 0; i < DiagsLevel_Count; i++) {
fprintf(fp, " %10s [stdout=%d, stderr=%d, syslog=%d, diagslog=%d]\n", level_name((DiagsLevel)i), config.outputs[i].to_stdout,
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].