summaryrefslogtreecommitdiff
path: root/src/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.c')
-rwxr-xr-xsrc/debug.c56
1 files changed, 26 insertions, 30 deletions
diff --git a/src/debug.c b/src/debug.c
index f1fd9b3..498a8e6 100755
--- a/src/debug.c
+++ b/src/debug.c
@@ -25,35 +25,31 @@
void assert_screen(const char* tag_name, const char* file, int line, const char* func, const char *expr, const char *fmt, ...)
{
- app_control_h app_control;
- va_list ap;
- char pid_buffer[16] = {0};
- char result_buffer[256] = {0};
- char line_buffer[16] = {0};
+ app_control_h app_control;
+ va_list ap;
+ char pid_buffer[16] = {0};
+ char result_buffer[256] = {0};
+ char line_buffer[16] = {0};
- app_control_create(&app_control);
- app_control_set_app_id(app_control, "com.samsung.assert-scr");
- snprintf(pid_buffer, sizeof(pid_buffer), "%d", getpid());
- app_control_add_extra_data(app_control, "pid", pid_buffer);
- app_control_add_extra_data(app_control, "appname", tag_name);
- if(fmt == NULL)
- {
- snprintf(result_buffer, sizeof(result_buffer), "%s", expr);
- }
- else
- {
- char arg_buffer[256] = {0};
-
- va_start(ap, fmt);
- vsnprintf(arg_buffer, sizeof(arg_buffer), fmt, ap);
- va_end(ap);
- snprintf(result_buffer, sizeof(result_buffer), "(%s) %s", expr, arg_buffer);
- }
- app_control_add_extra_data(app_control, "assert_str", result_buffer);
- app_control_add_extra_data(app_control, "filename", file);
- snprintf(line_buffer, sizeof(line_buffer), "%d", line);
- app_control_add_extra_data(app_control, "line", line_buffer);
- app_control_add_extra_data(app_control, "funcname", func);
- app_control_send_launch_request(app_control, NULL,NULL );
- app_control_destroy(app_control);
+ app_control_create(&app_control);
+ app_control_set_app_id(app_control, "com.samsung.assert-scr");
+ snprintf(pid_buffer, sizeof(pid_buffer), "%d", getpid());
+ app_control_add_extra_data(app_control, "pid", pid_buffer);
+ app_control_add_extra_data(app_control, "appname", tag_name);
+ if (fmt == NULL)
+ snprintf(result_buffer, sizeof(result_buffer), "%s", expr);
+ else {
+ char arg_buffer[256] = {0};
+ va_start(ap, fmt);
+ vsnprintf(arg_buffer, sizeof(arg_buffer), fmt, ap);
+ va_end(ap);
+ snprintf(result_buffer, sizeof(result_buffer), "(%s) %s", expr, arg_buffer);
+ }
+ app_control_add_extra_data(app_control, "assert_str", result_buffer);
+ app_control_add_extra_data(app_control, "filename", file);
+ snprintf(line_buffer, sizeof(line_buffer), "%d", line);
+ app_control_add_extra_data(app_control, "line", line_buffer);
+ app_control_add_extra_data(app_control, "funcname", func);
+ app_control_send_launch_request(app_control, NULL, NULL);
+ app_control_destroy(app_control);
}