sending WHY2_CHAT_CODE_PM as a code

This commit is contained in:
Václav Šmejkal 2025-01-31 14:04:40 +01:00
parent 9ab4f50fc6
commit c120d38804
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -241,10 +241,10 @@ int main(void)
} }
//BUILD MESSAGE TO SEND TO SERVER //BUILD MESSAGE TO SEND TO SERVER
char *final_message = why2_malloc(strlen(WHY2_CHAT_CODE_PM) + strlen(id) + strlen(msg) + 3); char *final_message = why2_malloc(strlen(id) + strlen(msg) + 2);
sprintf(final_message, WHY2_CHAT_CODE_PM ";%s;%s%c", id, msg, '\0'); sprintf(final_message, "%s;%s%c", id, msg, '\0');
why2_send_socket(final_message, NULL, listen_socket); //SEND why2_send_socket_code(final_message, NULL, listen_socket, WHY2_CHAT_CODE_PM); //SEND
//DEALLOCATION //DEALLOCATION
why2_deallocate(id); why2_deallocate(id);