removed useless json syntax checks

its useless since I added check to read_socket_raw
This commit is contained in:
Václav Šmejkal 2024-08-30 14:46:45 +02:00
parent 184e71c899
commit 875a1b8ac2
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -63,8 +63,6 @@ char *get_string_from_json_string(char *json, char *string)
{
struct json_object *json_obj = json_tokener_parse(json);
if (json_obj == NULL) return NULL; //INVALID SYNTAX WAS SENT BY SOME FUCKING SCRIPT KIDDIE
char *returning = why2_strdup(get_string_from_json(json_obj, string));
//DEALLOCATION
@ -107,8 +105,6 @@ void send_to_all(char *json)
char *message = get_string_from_json(json_obj, "message");
char *username = get_string_from_json(json_obj, "username");
if (json_obj == NULL) return; //EXIT IF INVALID SYNTAX WAS SENT
while (node_buffer -> next != NULL) //SEND TO ALL CONNECTIONS
{
node_buffer = node_buffer -> next;