mirror of
https://github.com/clearlinux/telemetrics-client.git
synced 2026-09-01 11:15:51 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b84ef8e50b | ||
|
|
4482392f02 | ||
|
|
059b785b39 | ||
|
|
e525725723 |
+1
-1
@@ -2,7 +2,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT([telemetrics-client], [2.4.0], [https://clearlinux.org/])
|
||||
AC_INIT([telemetrics-client], [2.3.5], [https://clearlinux.org/])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AM_INIT_AUTOMAKE([1.14 -Wall -Werror -Wno-extra-portability foreign subdir-objects])
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
+5
-6
@@ -977,18 +977,17 @@ int tm_set_payload(struct telem_ref *t_ref, char *payload)
|
||||
size_t payload_len;
|
||||
int ret = 0;
|
||||
|
||||
if (payload == NULL) {
|
||||
telem_log(LOG_WARNING, "payload pointer is NULL\n");
|
||||
payload_len = strlen((char *)payload);
|
||||
|
||||
if (payload_len > MAX_PAYLOAD_LENGTH) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
payload_len = strnlen(payload, MAX_PAYLOAD_LENGTH);
|
||||
|
||||
if (payload_is_ascii(payload, payload_len) != 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
t_ref->record->payload = strndup(payload, payload_len);
|
||||
t_ref->record->payload = strdup(payload);
|
||||
|
||||
if (!t_ref->record->payload) {
|
||||
telem_log(LOG_CRIT, "CRIT: Out of memory\n");
|
||||
@@ -1274,7 +1273,7 @@ int tm_send_record(struct telem_ref *t_ref)
|
||||
*/
|
||||
record_size = (2 * sizeof(uint32_t)) + total_size + 1;
|
||||
|
||||
data = (char *)calloc(sizeof(char), record_size);
|
||||
data = calloc(sizeof(char), record_size);
|
||||
if (!data) {
|
||||
telem_log(LOG_CRIT, "CRIT: Out of memory\n");
|
||||
close(sfd);
|
||||
|
||||
Reference in New Issue
Block a user