? profile.rc ? civscore.log ? user_times ? ok ? no_reaction1.diff ? err Index: client/clinet.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/clinet.c,v retrieving revision 1.47 diff -u -r1.47 clinet.c --- client/clinet.c 2001/09/20 19:54:33 1.47 +++ client/clinet.c 2001/10/08 07:54:16 @@ -81,7 +81,6 @@ struct connection aconnection; static struct sockaddr_in server_addr; -static struct hash_table *non_user_requests; /************************************************************************** Close socket and cleanup. This one doesn't print a message, so should @@ -215,8 +214,6 @@ aconnection.outgoing_packet_notify = notify_about_outgoing_packet; aconnection.used = 1; - non_user_requests = hash_new(hash_fval_int, hash_fcmp_int); - /* call gui-dependent stuff in gui_main.c */ add_net_input(aconnection.sock); @@ -579,42 +576,4 @@ server_list_unlink_all(server_list); free(server_list); -} - -/************************************************************************** -A request which wasn't directly caused by the user is called non-user -request. Examples are PONG packets or attribute chunks which are sent -at the end of the turn. -**************************************************************************/ -void add_non_user_request(int request_id) -{ - int *key = fc_malloc(sizeof(int)); - - *key = request_id; - - assert(!hash_key_exists(non_user_requests, key)); - hash_insert(non_user_requests, key, key); - - freelog(LOG_DEBUG, "add_non_user_request(request_id=%d)", request_id); -} - -/************************************************************************** -... -**************************************************************************/ -int test_non_user_request_and_remove(int request_id) -{ - int *value; - int result; - - value = hash_delete_entry(non_user_requests, &request_id); - if (value) { - assert(*value == request_id); - free(value); - } - result = (value != NULL); - - freelog(LOG_DEBUG, - "test_non_user_request_and_remove(request_id=%d) = %d", - request_id, result); - return result; } Index: client/clinet.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/clinet.h,v retrieving revision 1.14 diff -u -r1.14 clinet.h --- client/clinet.h 2001/09/16 18:49:44 1.14 +++ client/clinet.h 2001/10/08 07:54:16 @@ -32,8 +32,6 @@ void input_from_server_till_request_got_processed(int fd, int expected_request_id); void disconnect_from_server(void); -void add_non_user_request(int request_id); -int test_non_user_request_and_remove(int request_id); extern struct connection aconnection; /* this is the client's connection to the server */ Index: client/packhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v retrieving revision 1.194 diff -u -r1.194 packhand.c --- client/packhand.c 2001/10/06 21:02:00 1.194 +++ client/packhand.c 2001/10/08 07:54:18 @@ -66,8 +66,6 @@ #include "packhand.h" -static int packets_caused_by_current_request = 0; - static void handle_city_packet_common(struct city *pcity, int is_new, int popup, int investigate); @@ -2198,8 +2196,6 @@ freelog(LOG_DEBUG, "start processing packet %d", aconnection.client.request_id_of_currently_handled_packet); - - packets_caused_by_current_request = 0; } /************************************************************************** @@ -2215,14 +2211,6 @@ aconnection.client.last_processed_request_id_seen = aconnection.client.request_id_of_currently_handled_packet; - /* The client received only the processing-finished packet. Don't - show this message for non-user request. */ - if (!test_non_user_request_and_remove - (aconnection.client.request_id_of_currently_handled_packet) - && packets_caused_by_current_request == 1) { - append_output_window(_("Client: No reaction from server.")); - } - aconnection.client.request_id_of_currently_handled_packet = 0; } @@ -2234,9 +2222,6 @@ { freelog(LOG_DEBUG, "incomming packet={type=%d, size=%d}", packet_type, size); - if (aconnection.client.request_id_of_currently_handled_packet) { - packets_caused_by_current_request++; - } } /************************************************************************** @@ -2250,8 +2235,4 @@ packet_type, size, request_id); assert(request_id); - if (packet_type == PACKET_CONN_PONG - || packet_type == PACKET_ATTRIBUTE_CHUNK) { - add_non_user_request(request_id); - } }