mirror of git://git.sysmocom.de/ofono
Refactor: Reorder argument order
The order of arguments was a bit confusing, reorder them to make more logical sense.
This commit is contained in:
parent
7145edd3a4
commit
aebda1ac94
|
@ -709,8 +709,8 @@ static gboolean received_data(GIOChannel *channel, GIOCondition cond,
|
||||||
buf = ring_buffer_write_ptr(chat->buf);
|
buf = ring_buffer_write_ptr(chat->buf);
|
||||||
|
|
||||||
err = g_io_channel_read(channel, (char *) buf, toread, &rbytes);
|
err = g_io_channel_read(channel, (char *) buf, toread, &rbytes);
|
||||||
g_at_util_debug_chat(chat->debugf, TRUE, (char *)buf, rbytes,
|
g_at_util_debug_chat(TRUE, (char *)buf, rbytes,
|
||||||
chat->debug_data);
|
chat->debugf, chat->debug_data);
|
||||||
|
|
||||||
total_read += rbytes;
|
total_read += rbytes;
|
||||||
|
|
||||||
|
@ -856,9 +856,8 @@ static gboolean can_write_data(GIOChannel *channel, GIOCondition cond,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_at_util_debug_chat(chat->debugf, FALSE,
|
g_at_util_debug_chat(FALSE, cmd->cmd + chat->cmd_bytes_written,
|
||||||
cmd->cmd + chat->cmd_bytes_written,
|
bytes_written, chat->debugf, chat->debug_data);
|
||||||
bytes_written, chat->debug_data);
|
|
||||||
chat->cmd_bytes_written += bytes_written;
|
chat->cmd_bytes_written += bytes_written;
|
||||||
|
|
||||||
if (bytes_written < towrite)
|
if (bytes_written < towrite)
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
|
|
||||||
#include "gatutil.h"
|
#include "gatutil.h"
|
||||||
|
|
||||||
void g_at_util_debug_chat(GAtDebugFunc debugf, gboolean in, const char *str,
|
void g_at_util_debug_chat(gboolean in, const char *str, gsize len,
|
||||||
gsize len, gpointer user_data)
|
GAtDebugFunc debugf, gpointer user_data)
|
||||||
{
|
{
|
||||||
char type = in ? '<' : '>';
|
char type = in ? '<' : '>';
|
||||||
gsize escaped = 2; /* Enough for '<', ' ' */
|
gsize escaped = 2; /* Enough for '<', ' ' */
|
||||||
|
|
|
@ -28,8 +28,8 @@ extern "C" {
|
||||||
|
|
||||||
#include "gat.h"
|
#include "gat.h"
|
||||||
|
|
||||||
void g_at_util_debug_chat(GAtDebugFunc debugf, gboolean in, const char *str,
|
void g_at_util_debug_chat(gboolean in, const char *str, gsize len,
|
||||||
gsize len, gpointer user_data);
|
GAtDebugFunc debugf, gpointer user_data);
|
||||||
|
|
||||||
gboolean g_at_util_setup_io(GIOChannel *io);
|
gboolean g_at_util_setup_io(GIOChannel *io);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue