Line formatting.

This commit is contained in:
Nicolás Ortega Froysa 2017-11-22 17:23:42 +01:00
parent 0553f4eb19
commit 884d1adb42
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF

View File

@ -34,13 +34,15 @@ struct NeoComm_message *NeoComm_get_next_message(const char *channel_name) {
return NULL;
const dht::ImMessage *new_msg = &channels[s_chan_name].msgs.front();
struct NeoComm_message *msg =
static_cast<struct NeoComm_message*>(malloc(sizeof(struct NeoComm_message)));
static_cast<struct NeoComm_message*>(
malloc(sizeof(struct NeoComm_message)));
msg->msg = static_cast<char*>(malloc(new_msg->msg.size()));
strcpy(msg->msg, new_msg->msg.c_str());
msg->sent = new_msg->date;
msg->from.nick = NULL; // TODO: Implement this!
msg->from.hash = static_cast<char*>(malloc(strlen(new_msg->from.to_c_str())));
msg->from.hash = static_cast<char*>(
malloc(strlen(new_msg->from.to_c_str())));
strcpy(msg->from.hash, new_msg->from.to_c_str());
channels[s_chan_name].msgs.pop();