summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-01-20 14:21:22 -0600
committerDenis Kenzior <denkenz@gmail.com>2010-01-20 14:21:22 -0600
commitaebda1ac9471949351d29a02a1aa7101f0eb06b5 (patch)
treefcf5a849add696e8bdd706c83bb2fd643ec42a5b
parent7145edd3a416b133da1a208292b919256c822baf (diff)
downloadofono-aebda1ac9471949351d29a02a1aa7101f0eb06b5.tar.bz2
Refactor: Reorder argument order
The order of arguments was a bit confusing, reorder them to make more logical sense.
-rw-r--r--gatchat/gatchat.c9
-rw-r--r--gatchat/gatutil.c4
-rw-r--r--gatchat/gatutil.h4
3 files changed, 8 insertions, 9 deletions
diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c
index 9d8d6406..7026408c 100644
--- a/gatchat/gatchat.c
+++ b/gatchat/gatchat.c
@@ -709,8 +709,8 @@ static gboolean received_data(GIOChannel *channel, GIOCondition cond,
buf = ring_buffer_write_ptr(chat->buf);
err = g_io_channel_read(channel, (char *) buf, toread, &rbytes);
- g_at_util_debug_chat(chat->debugf, TRUE, (char *)buf, rbytes,
- chat->debug_data);
+ g_at_util_debug_chat(TRUE, (char *)buf, rbytes,
+ chat->debugf, chat->debug_data);
total_read += rbytes;
@@ -856,9 +856,8 @@ static gboolean can_write_data(GIOChannel *channel, GIOCondition cond,
return FALSE;
}
- g_at_util_debug_chat(chat->debugf, FALSE,
- cmd->cmd + chat->cmd_bytes_written,
- bytes_written, chat->debug_data);
+ g_at_util_debug_chat(FALSE, cmd->cmd + chat->cmd_bytes_written,
+ bytes_written, chat->debugf, chat->debug_data);
chat->cmd_bytes_written += bytes_written;
if (bytes_written < towrite)
diff --git a/gatchat/gatutil.c b/gatchat/gatutil.c
index 6bc5dcbb..dcff4c7b 100644
--- a/gatchat/gatutil.c
+++ b/gatchat/gatutil.c
@@ -30,8 +30,8 @@
#include "gatutil.h"
-void g_at_util_debug_chat(GAtDebugFunc debugf, gboolean in, const char *str,
- gsize len, gpointer user_data)
+void g_at_util_debug_chat(gboolean in, const char *str, gsize len,
+ GAtDebugFunc debugf, gpointer user_data)
{
char type = in ? '<' : '>';
gsize escaped = 2; /* Enough for '<', ' ' */
diff --git a/gatchat/gatutil.h b/gatchat/gatutil.h
index b17dad44..3aa82652 100644
--- a/gatchat/gatutil.h
+++ b/gatchat/gatutil.h
@@ -28,8 +28,8 @@ extern "C" {
#include "gat.h"
-void g_at_util_debug_chat(GAtDebugFunc debugf, gboolean in, const char *str,
- gsize len, gpointer user_data);
+void g_at_util_debug_chat(gboolean in, const char *str, gsize len,
+ GAtDebugFunc debugf, gpointer user_data);
gboolean g_at_util_setup_io(GIOChannel *io);