summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data.c4
-rw-r--r--gtk.c8
-rw-r--r--main.c2
-rw-r--r--net_legacy.c22
-rw-r--r--net_rewrite.c4
5 files changed, 20 insertions, 20 deletions
diff --git a/data.c b/data.c
index 3780fd0..f8be1ff 100644
--- a/data.c
+++ b/data.c
@@ -44,7 +44,7 @@ void data_add_roster_item(const char* jid, const char* subscription,
} else if (strcmp(subscription, "both") == 0) {
item->sub = SUB_BOTH;
} else {
- printf("Invalid subscription '%s'!\n", subscription);
+ fprintf(stderr, "Invalid subscription '%s'!\n", subscription);
return;
}
item->chat = chat;
@@ -78,7 +78,7 @@ void data_add_incoming_message(const char* sender_jid, const char* content) {
}
}
if (chat == NULL) {
- printf("Could not find chat for message from '%s'!\n", sender_jid);
+ fprintf(stderr, "Could not find chat for message from '%s'!\n", sender_jid);
return;
}
diff --git a/gtk.c b/gtk.c
index 03dfe79..7540b19 100644
--- a/gtk.c
+++ b/gtk.c
@@ -50,7 +50,7 @@ static void connect_cb(void) {
gtk_stack_set_visible_child(GTK_STACK(stack), roster_layout_box);
// just dummy output
- printf("Connecting with:\nJID: %s\nPWD: %s\n", jid_text, pwd_text);
+ fprintf(stderr, "Connecting with:\nJID: %s\nPWD: %s\n", jid_text, pwd_text);
net_connect(jid_text, pwd_text);
}
@@ -60,7 +60,7 @@ static void disconnect_cb(void) {
gtk_stack_set_visible_child(GTK_STACK(stack), connector_box);
// just dummy output
- printf("Disconnected!\n");
+ fprintf(stderr, "Disconnected!\n");
net_disconnect();
}
@@ -232,10 +232,10 @@ void gui_add_roster_item_widget(roster_item_t* item) {
// print debug message
if (item->name) {
- printf("roster item: %s, %s, sub:%d\n", item->name, item->jid,
+ fprintf(stderr, "roster item: %s, %s, sub:%d\n", item->name, item->jid,
item->sub);
} else {
- printf("roster item: (no name), %s, sub:%d\n", item->jid, item->sub);
+ fprintf(stderr, "roster item: (no name), %s, sub:%d\n", item->jid, item->sub);
}
// create widget for roster item
diff --git a/main.c b/main.c
index 42343a8..2b155d5 100644
--- a/main.c
+++ b/main.c
@@ -71,7 +71,7 @@ static void get_opts(Options* opts, int argc, char* argv[]) {
// prints out the help page.
static void print_help(void) {
- fprintf(stderr,
+ printf(
"The Linux on mobile XMPP (LimoX) client.\n"
"\n"
"Usage: limox [-h]\n"
diff --git a/net_legacy.c b/net_legacy.c
index 3e8b4cf..c3b2f62 100644
--- a/net_legacy.c
+++ b/net_legacy.c
@@ -42,7 +42,7 @@ static int message_handler(xmpp_conn_t* conn, xmpp_stanza_t* stanza,
xmpp_stanza_t* body = xmpp_stanza_get_child_by_name(stanza, "body");
if (body == NULL) {
- printf("DEBUG: Got message stanza of type char without body!\n");
+ fprintf(stderr, "DEBUG: Got message stanza of type char without body!\n");
return 1;
}
@@ -78,7 +78,7 @@ static void conn_handler(xmpp_conn_t *conn, xmpp_conn_event_t status,int error,
switch (status) {
case XMPP_CONN_CONNECT:
- printf("DEBUG: Got XMPP_CONN_CONNECT\n");
+ fprintf(stderr, "DEBUG: Got XMPP_CONN_CONNECT\n");
// add handler for <message> stanzas
xmpp_handler_add(conn, message_handler, NULL, "message", "chat",
@@ -107,26 +107,26 @@ static void conn_handler(xmpp_conn_t *conn, xmpp_conn_event_t status,int error,
break;
case XMPP_CONN_RAW_CONNECT:
- printf("DEBUG: Got XMPP_CONN_RAW_CONNECT\n");
+ fprintf(stderr, "DEBUG: Got XMPP_CONN_RAW_CONNECT\n");
break;
case XMPP_CONN_DISCONNECT:
- printf("DEBUG: Got XMPP_CONN_DISCONNECT\n");
+ fprintf(stderr, "DEBUG: Got XMPP_CONN_DISCONNECT\n");
break;
case XMPP_CONN_FAIL:
- printf("DEBUG: Got XMPP_CONN_FAIL\n");
+ fprintf(stderr, "DEBUG: Got XMPP_CONN_FAIL\n");
break;
default:
- printf("DEBUG: Got unknown connection status '%d'!\n", status);
+ fprintf(stderr, "DEBUG: Got unknown connection status '%d'!\n", status);
exit(1);
}
}
void net_init(void) {
- printf("net_init()\n");
+ fprintf(stderr, "net_init()\n");
xmpp_initialize();
log = xmpp_get_default_logger(XMPP_LEVEL_DEBUG); // or NULL for silence
@@ -166,7 +166,7 @@ void net_run_once(void) {
void net_quit(void) {
- printf("net_quit()\n");
+ fprintf(stderr, "net_quit()\n");
net_disconnect();
// TODO is it possible to free xmpp_log_t ?
@@ -178,7 +178,7 @@ void net_quit(void) {
void net_connect(const char* jid, const char* password) {
- printf("net_connect()\n");
+ fprintf(stderr, "net_connect()\n");
conn = xmpp_conn_new(ctx);
@@ -195,7 +195,7 @@ void net_connect(const char* jid, const char* password) {
void net_disconnect(void) {
- printf("net_disconnect()\n");
+ fprintf(stderr, "net_disconnect()\n");
if (sm_state) {
xmpp_free_sm_state(sm_state);
@@ -209,7 +209,7 @@ void net_disconnect(void) {
// state "disconnecting"
}
if (!xmpp_conn_release(conn)) {
- printf("DEBUG: Could not free connection!\n");
+ fprintf(stderr, "DEBUG: Could not free connection!\n");
}
}
diff --git a/net_rewrite.c b/net_rewrite.c
index 3ab9726..55a3520 100644
--- a/net_rewrite.c
+++ b/net_rewrite.c
@@ -19,7 +19,7 @@ static xmpp_ctx_t* ctx;
void net_init(void) {
- printf("limox: net_init()\n");
+ fprintf(stderr, "limox: net_init()\n");
xmpp_initialize();
log = xmpp_get_default_logger(XMPP_LEVEL_DEBUG); // or NULL for silence
@@ -34,7 +34,7 @@ void net_run_once(void) {
void net_quit(void) {
- printf("limox: net_quit()\n");
+ fprintf(stderr, "limox: net_quit()\n");
xmpp_ctx_free(ctx);
xmpp_shutdown();