summaryrefslogtreecommitdiffstats
path: root/gril
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2015-10-13 21:37:11 -0500
committerDenis Kenzior <denkenz@gmail.com>2015-10-13 21:37:11 -0500
commitcf227ffc2aefbfd2023653e88a06ce951d8965ef (patch)
tree0020ac1fce6bf3b67882cc3a3acd0942f0b6bd42 /gril
parentc14a25f028a6d99890d04174d23939635ee64476 (diff)
downloadofono-cf227ffc2aefbfd2023653e88a06ce951d8965ef.tar.bz2
gril: Remove unused function
Diffstat (limited to 'gril')
-rw-r--r--gril/grilutil.c79
-rw-r--r--gril/grilutil.h3
2 files changed, 0 insertions, 82 deletions
diff --git a/gril/grilutil.c b/gril/grilutil.c
index ce51e0a0..18cffffc 100644
--- a/gril/grilutil.c
+++ b/gril/grilutil.c
@@ -661,85 +661,6 @@ const char *ril_pdp_fail_to_string(int status)
}
}
-void g_ril_util_debug_chat(gboolean in, const char *str, gsize len,
- GRilDebugFunc debugf, gpointer user_data)
-{
- char type = in ? '<' : '>';
- gsize escaped = 2; /* Enough for '<', ' ' */
- char *escaped_str;
- const char *esc = "<ESC>";
- gsize esc_size = strlen(esc);
- const char *ctrlz = "<CtrlZ>";
- gsize ctrlz_size = strlen(ctrlz);
- gsize i;
-
- if (debugf == NULL || !len)
- return;
-
- for (i = 0; i < len; i++) {
- char c = str[i];
-
- if (g_ascii_isprint(c))
- escaped += 1;
- else if (c == '\r' || c == '\t' || c == '\n')
- escaped += 2;
- else if (c == 26)
- escaped += ctrlz_size;
- else if (c == 25)
- escaped += esc_size;
- else
- escaped += 4;
- }
-
- escaped_str = g_try_malloc(escaped + 1);
- if (escaped_str == NULL)
- return;
-
- escaped_str[0] = type;
- escaped_str[1] = ' ';
- escaped_str[2] = '\0';
- escaped_str[escaped] = '\0';
-
- for (escaped = 2, i = 0; i < len; i++) {
- unsigned char c = str[i];
-
- switch (c) {
- case '\r':
- escaped_str[escaped++] = '\\';
- escaped_str[escaped++] = 'r';
- break;
- case '\t':
- escaped_str[escaped++] = '\\';
- escaped_str[escaped++] = 't';
- break;
- case '\n':
- escaped_str[escaped++] = '\\';
- escaped_str[escaped++] = 'n';
- break;
- case 26:
- strncpy(&escaped_str[escaped], ctrlz, ctrlz_size);
- escaped += ctrlz_size;
- break;
- case 25:
- strncpy(&escaped_str[escaped], esc, esc_size);
- escaped += esc_size;
- break;
- default:
- if (g_ascii_isprint(c))
- escaped_str[escaped++] = c;
- else {
- escaped_str[escaped++] = '\\';
- escaped_str[escaped++] = '0' + ((c >> 6) & 07);
- escaped_str[escaped++] = '0' + ((c >> 3) & 07);
- escaped_str[escaped++] = '0' + (c & 07);
- }
- }
- }
-
- debugf(escaped_str, user_data);
- g_free(escaped_str);
-}
-
void g_ril_util_debug_dump(gboolean in, const unsigned char *buf, gsize len,
GRilDebugFunc debugf, gpointer user_data)
{
diff --git a/gril/grilutil.h b/gril/grilutil.h
index be59366f..f216949f 100644
--- a/gril/grilutil.h
+++ b/gril/grilutil.h
@@ -45,9 +45,6 @@ const char *ril_request_id_to_string(int req);
const char *ril_unsol_request_to_string(int request);
const char *ril_pdp_fail_to_string(int status);
-void g_ril_util_debug_chat(gboolean in, const char *str, gsize len,
- GRilDebugFunc debugf, gpointer user_data);
-
void g_ril_util_debug_dump(gboolean in, const unsigned char *buf, gsize len,
GRilDebugFunc debugf, gpointer user_data);