summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/dlt/dlt_user.h8
-rw-r--r--src/lib/dlt_user.c106
2 files changed, 0 insertions, 114 deletions
diff --git a/include/dlt/dlt_user.h b/include/dlt/dlt_user.h
index a5199b4..c7a9949 100644
--- a/include/dlt/dlt_user.h
+++ b/include/dlt/dlt_user.h
@@ -825,14 +825,6 @@ DltReturnValue dlt_log_raw(DltContext *handle, DltLogLevelType loglevel, void *d
DltReturnValue dlt_log_marker();
/**
- * Forward a complete DLT message to the DLT daemon
- * @param msgdata Message data of DLT message
- * @param size Size of DLT message
- * @return Value from DltReturnValue enum
- */
-DltReturnValue dlt_forward_msg(void *msgdata, size_t size);
-
-/**
* Get the total size and available size of the shared memory buffer between daemon and applications.
* This information is useful to control the flow control between applications and daemon.
* For example only 50% of the buffer should be used for file transfer.
diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c
index 13ac2eb..f9318cb 100644
--- a/src/lib/dlt_user.c
+++ b/src/lib/dlt_user.c
@@ -1507,112 +1507,6 @@ int dlt_set_resend_timeout_atexit(uint32_t timeout_in_milliseconds)
return 0;
}
-
-DltReturnValue dlt_forward_msg(void *msgdata, size_t size)
-{
- DltUserHeader userheader;
- DltReturnValue ret;
-
- if ((msgdata == NULL) || (size == 0))
- return DLT_RETURN_WRONG_PARAMETER;
-
- /* forbid dlt usage in child after fork */
- if (g_dlt_is_child)
- return DLT_RETURN_ERROR;
-
- if (dlt_user_set_userheader(&userheader, DLT_USER_MESSAGE_LOG) < DLT_RETURN_OK)
- /* Type of internal user message; same value for Trace messages */
- return DLT_RETURN_ERROR;
-
- if (dlt_user.dlt_is_file) {
- /* log to file */
- return dlt_user_log_out2(dlt_user.dlt_log_handle, msgdata, size, 0, 0);
- }
- else {
- /* Reattach to daemon if neccesary */
- dlt_user_log_reattach_to_daemon();
-
- if (dlt_user.overflow_counter) {
- if (dlt_user_log_send_overflow() == 0) {
- dlt_vnlog(LOG_WARNING,
- DLT_USER_BUFFER_LENGTH,
- "Buffer full! %u messages discarded!\n",
- dlt_user.overflow_counter);
- dlt_user.overflow_counter = 0;
- }
- }
-
- ret = dlt_user_log_out3(dlt_user.dlt_log_handle,
- &(userheader), sizeof(DltUserHeader),
- msgdata, size, 0, 0);
-
- /* store message in ringbuffer, if an error has occured */
- if (ret < DLT_RETURN_OK) {
- DLT_SEM_LOCK();
-
- if (ret == DLT_RETURN_PIPE_ERROR) {
- /* handle not open or pipe error */
- close(dlt_user.dlt_log_handle);
- dlt_user.dlt_log_handle = -1;
- }
-
- if (dlt_buffer_push3(&(dlt_user.startup_buffer),
- (unsigned char *)&(userheader), sizeof(DltUserHeader),
- msgdata, size, 0, 0) == DLT_RETURN_ERROR) {
- if (dlt_user.overflow_counter == 0)
- dlt_log(LOG_WARNING, "Buffer full! First message discarded!\n");
-
- ret = DLT_RETURN_BUFFER_FULL;
- }
-
- DLT_SEM_FREE();
- }
-
- switch (ret) {
- case DLT_RETURN_WRONG_PARAMETER:
- {
- /* wrong parameters */
- return DLT_RETURN_WRONG_PARAMETER;
- }
- case DLT_RETURN_BUFFER_FULL:
- {
- /* Buffer full */
- dlt_user.overflow_counter += 1;
- return DLT_RETURN_ERROR;
- }
- case DLT_RETURN_PIPE_FULL:
- {
- /* data could not be written */
- return DLT_RETURN_ERROR;
- }
- case DLT_RETURN_PIPE_ERROR:
- {
- /* handle not open or pipe error */
- close(dlt_user.dlt_log_handle);
- dlt_user.dlt_log_handle = -1;
-
- return DLT_RETURN_ERROR;
- }
- case DLT_RETURN_ERROR:
- {
- /* other error condition */
- return DLT_RETURN_ERROR;
- }
- case DLT_RETURN_OK:
- {
- return DLT_RETURN_OK;
- }
- default:
- {
- /* This case should not occur */
- return DLT_RETURN_ERROR;
- }
- }
- }
-
- return DLT_RETURN_OK;
-}
-
/* ********************************************************************************************* */
inline DltReturnValue dlt_user_log_write_start(DltContext *handle, DltContextData *log, DltLogLevelType loglevel)