version 1.1.1.1.2.11, 2012/04/27 16:17:11
|
version 1.1.1.1.2.13, 2012/04/27 16:40:23
|
Line 411 mqtt_subCopy(mqtt_subscr_t * __restrict dst, mqtt_subs
|
Line 411 mqtt_subCopy(mqtt_subscr_t * __restrict dst, mqtt_subs
|
memcpy(dst->sub_topic.msg_base, src->sub_topic.msg_base, |
memcpy(dst->sub_topic.msg_base, src->sub_topic.msg_base, |
dst->sub_topic.msg_len); |
dst->sub_topic.msg_len); |
} |
} |
|
} else { |
|
/* |
|
if (dst->sub_topic.msg_base) |
|
free(dst->sub_topic.msg_base); |
|
*/ |
|
dst->sub_topic.msg_base = NULL; |
|
dst->sub_topic.msg_len = 0; |
} |
} |
if (src->sub_value.msg_base) { |
if (src->sub_value.msg_base) { |
dst->sub_value.msg_base = malloc(src->sub_value.msg_len + 1); |
dst->sub_value.msg_base = malloc(src->sub_value.msg_len + 1); |
Line 426 mqtt_subCopy(mqtt_subscr_t * __restrict dst, mqtt_subs
|
Line 433 mqtt_subCopy(mqtt_subscr_t * __restrict dst, mqtt_subs
|
memcpy(dst->sub_value.msg_base, src->sub_value.msg_base, |
memcpy(dst->sub_value.msg_base, src->sub_value.msg_base, |
dst->sub_value.msg_len); |
dst->sub_value.msg_len); |
} |
} |
|
} else { |
|
/* |
|
if (dst->sub_value.msg_base) |
|
free(dst->sub_value.msg_base); |
|
*/ |
|
dst->sub_value.msg_base = NULL; |
|
dst->sub_value.msg_len = 0; |
} |
} |
|
|
dst->sub_ret = src->sub_ret; |
dst->sub_ret = src->sub_ret; |