diff options
Diffstat (limited to 'src/gnunet_chat_lib.c')
-rw-r--r-- | src/gnunet_chat_lib.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gnunet_chat_lib.c b/src/gnunet_chat_lib.c index 05590a0..adf0eff 100644 --- a/src/gnunet_chat_lib.c +++ b/src/gnunet_chat_lib.c | |||
@@ -897,6 +897,8 @@ GNUNET_CHAT_message_get_text (const struct GNUNET_CHAT_Message *message) | |||
897 | 897 | ||
898 | if (GNUNET_CHAT_FLAG_WARNING == message->flag) | 898 | if (GNUNET_CHAT_FLAG_WARNING == message->flag) |
899 | return message->warning; | 899 | return message->warning; |
900 | if (GNUNET_MESSENGER_KIND_FILE == message->msg->header.kind) | ||
901 | return message->msg->body.file.name; | ||
900 | if (GNUNET_MESSENGER_KIND_TEXT != message->msg->header.kind) | 902 | if (GNUNET_MESSENGER_KIND_TEXT != message->msg->header.kind) |
901 | return NULL; | 903 | return NULL; |
902 | 904 | ||
@@ -953,6 +955,16 @@ GNUNET_CHAT_message_delete (const struct GNUNET_CHAT_Message *message, | |||
953 | } | 955 | } |
954 | 956 | ||
955 | 957 | ||
958 | const char* | ||
959 | GNUNET_CHAT_file_get_name (const struct GNUNET_CHAT_File *file) | ||
960 | { | ||
961 | if (!file) | ||
962 | return NULL; | ||
963 | |||
964 | return file->name; | ||
965 | } | ||
966 | |||
967 | |||
956 | const struct GNUNET_HashCode* | 968 | const struct GNUNET_HashCode* |
957 | GNUNET_CHAT_file_get_hash (const struct GNUNET_CHAT_File *file) | 969 | GNUNET_CHAT_file_get_hash (const struct GNUNET_CHAT_File *file) |
958 | { | 970 | { |