Done until djumbai-send
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
#include "protocol.h"
|
||||
|
||||
int new_message(message *m, unsigned int sender, unsigned int receiver, char *content) {
|
||||
int new_message(message *m, unsigned int sender, unsigned int isgroup, unsigned int receiver, char *content) {
|
||||
if (strlen(content) > MAX_CONTENT_SIZE) {
|
||||
return 1;
|
||||
}
|
||||
m->header.version = VERSION;
|
||||
m->header.sender = sender;
|
||||
m->header.isgroup = isgroup;
|
||||
m->header.receiver = receiver;
|
||||
time(&m->header.timestamp);
|
||||
strncpy(m->content, content, MAX_CONTENT_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user