+ actionTypeStr = (char *)malloc(1024);
+ if(actionTypeStr != NULL)
+ {
+ sprintf(actionTypeStr, "%ld %u", actionset->timesteps, actionset->type);
+ if(remaining >= strlen(actionTypeStr) + strlen(ACTION_DELIMITER) + 1)
+ {
+ strncat(temp, actionTypeStr, strlen(actionTypeStr));
+ remaining -= strlen(actionTypeStr);
+ strncat(temp, ACTION_DELIMITER, strlen(ACTION_DELIMITER));
+ remaining -= strlen(ACTION_DELIMITER);
+ free(actionTypeStr);
+ }
+ else
+ {
+ free(actionTypeStr);
+ res = OC_STACK_ERROR;
+ goto exit;
+ }
+ }
+ else
+ {
+ res = OC_STACK_ERROR;
+ goto exit;
+ }
+