online-caro.cpp
/*
* Process the log out request from client.
* @param     response    [OUT] The response from this server.
*/
Process the log out request from client.
Process the log out request from client .
void processLogout(char* response, char* state) {
	Account* node = accountDB;
	while (node != NULL) {
		if (strcmp(node->username, state) == 0) {
			node->status = STATUS_DEFAULT;
		}
		node = node->next;
	}
	printf("[RESPONSE]: Logout success - ID '%s'\n\n", state);
	free(state);
	state = (char*)malloc(DATA_MAX_SIZE * sizeof(char));
	strcpy(response, (char*)LOGOUT_SUCCESS);
}
void processLogout ( char * response , char * state ) { Account * node = accountDB ; while ( node != NULL ) { if ( strcmp ( node -> username , state ) == 0 ) { node -> status = STATUS_DEFAULT ; } node = node -> next ; } printf ( " \n \n " , state ) ; free ( state ) ; state = ( char * ) malloc ( DATA_MAX_SIZE * sizeof ( char ) ) ; strcpy ( response , ( char * ) LOGOUT_SUCCESS ) ; }
Process the log out request from client.
Process the log out request from client .