~ubuntu-branches/ubuntu/wily/trafficserver/wily

« back to all changes in this revision

Viewing changes to mgmt/api/remote/CoreAPIRemote.cc

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-12-17 22:28:16 UTC
  • mfrom: (5.1.8 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121217222816-7xwjsx5k76zkb63d
Tags: 3.2.0-1ubuntu1
* Revert FreeBSD strerror_r() fixes that give errors with glibc 2.16.
* Apply patch from Konstantinos Margaritis to define barriers on ARM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
  tokens.Initialize(list_str, COPY_TOKS);
129
129
  tok = tokens.iterFirst(&i_state);
130
130
  while (tok != NULL) {
131
 
    enqueue(list, xstrdup(tok));        // add token to LLQ
 
131
    enqueue(list, ats_strdup(tok));        // add token to LLQ
132
132
    tok = tokens.iterNext(&i_state);
133
133
  }
134
134
 
135
 
  if (list_str)
136
 
    xfree(list_str);
 
135
  ats_free(list_str);
137
136
  return TS_ERR_OKAY;
138
137
}
139
138
 
467
466
  if (!rec_name || !rec_ele)
468
467
    return TS_ERR_PARAMS;
469
468
 
470
 
  rec_ele->rec_name = xstrdup(rec_name);
 
469
  rec_ele->rec_name = ats_strdup(rec_name);
471
470
 
472
471
  // create and send request
473
472
  ret = send_record_get_request(main_socket_fd, rec_ele->rec_name);
491
490
    rec_ele->float_val = *(TSFloat *) val;
492
491
    break;
493
492
  case TS_REC_STRING:
494
 
    rec_ele->string_val = xstrdup((char *) val);
 
493
    rec_ele->string_val = ats_strdup((char *) val);
495
494
    break;
496
495
  default:                     // ERROR - invalid record type
497
496
    return TS_ERR_FAIL;
498
497
  }
499
498
 
500
 
  if (val)
501
 
    xfree(val);
 
499
  ats_free(val);
502
500
  return TS_ERR_OKAY;
503
501
}
504
502