projects
/
cascardo
/
f2fchat.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some debug when receiving a message
[cascardo/f2fchat.git]
/
message.c
diff --git
a/message.c
b/message.c
index
4104cff
..
8e3202d
100644
(file)
--- a/
message.c
+++ b/
message.c
@@
-55,8
+55,12
@@
gboolean message_incoming(GIOChannel *channel, GIOCondition cond, gpointer data)
} else {
struct friend *friend;
friend = friend_get_by_address(iaddress);
} else {
struct friend *friend;
friend = friend_get_by_address(iaddress);
- if (friend)
+ if (friend) {
+ printf("got message from %s\n", friend_get_name(friend));
g_source_remove_by_user_data(friend);
g_source_remove_by_user_data(friend);
+ } else {
+ printf("could not find friend from address %s\n", g_inet_address_to_string(iaddress));
+ }
}
g_object_unref(address);
g_free(buffer);
}
g_object_unref(address);
g_free(buffer);