Message system now uses queues instead of vectors.

This commit is contained in:
Nicolás Ortega Froysa
2017-11-21 16:34:50 +01:00
parent 7f7f9ae047
commit b1aa31403b
4 changed files with 21 additions and 18 deletions

View File

@ -36,15 +36,15 @@ extern "C" {
* @brief A structure with necessary variables for other users.
*/
struct NeoComm_user {
const char *nick; ///< The alias used by the user.
const char *hash; ///< The unique hash of the user.
char *nick; ///< The alias used by the user.
char *hash; ///< The unique hash of the user.
};
/**
* @brief Structure with relevant message information.
*/
struct NeoComm_message {
const char *msg; ///< The text message.
char *msg; ///< The text message.
time_t sent; ///< The time it was sent.
struct NeoComm_user from; ///< Info on the peer who sent the message.
};
@ -176,9 +176,7 @@ struct NeoComm_message *NeoComm_get_next_message(const char *channel_name);
*
* @param msg The message to free from memory.
*/
static inline void NeoComm_free_message(struct NeoComm_message *msg) {
free(msg);
}
void NeoComm_free_message(struct NeoComm_message *msg);
/**
* @brief Send a message to a channel.