} 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);
+ } else {
+ printf("could not find friend from address %s\n", g_inet_address_to_string(iaddress));
+ }
}
g_object_unref(address);
g_free(buffer);