Skip to content

Commit

Permalink
Updates for common helper functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
bretambrose committed Apr 15, 2024
1 parent 0053ef1 commit cbb958e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
4 changes: 2 additions & 2 deletions bin/elastishadow/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,8 +1062,8 @@ int main(int argc, char **argv) {
&app_ctx.streaming_operations,
allocator,
10,
aws_mqtt_hash_uint64_t,
aws_mqtt_compare_uint64_t_eq,
aws_hash_uint64_t,
aws_hash_compare_uint64_t_eq,
NULL,
s_release_streaming_operation);

Expand Down
3 changes: 0 additions & 3 deletions include/aws/mqtt/private/shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ AWS_EXTERN_C_BEGIN
AWS_MQTT_API extern const struct aws_byte_cursor *g_websocket_handshake_default_path;
AWS_MQTT_API extern const struct aws_http_header *g_websocket_handshake_default_protocol_header;

AWS_MQTT_API uint64_t aws_mqtt_hash_uint64_t(const void *item);
AWS_MQTT_API bool aws_mqtt_compare_uint64_t_eq(const void *a, const void *b);

AWS_EXTERN_C_END

#endif /* AWS_MQTT_SHARED_CONSTANTS_H */
12 changes: 2 additions & 10 deletions source/request-response/request_response_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1108,14 +1108,6 @@ static void s_aws_rr_client_protocol_adapter_connection_event_callback(
aws_rr_subscription_manager_on_protocol_adapter_connection_event(&rr_client->subscription_manager, event);
}

uint64_t aws_mqtt_hash_uint64_t(const void *item) {
return *(uint64_t *)item;
}

bool aws_mqtt_compare_uint64_t_eq(const void *a, const void *b) {
return *(uint64_t *)a == *(uint64_t *)b;
}

static int s_compare_rr_operation_timeouts(const void *a, const void *b) {
const struct aws_mqtt_rr_client_operation **operation_a_ptr = (void *)a;
const struct aws_mqtt_rr_client_operation *operation_a = *operation_a_ptr;
Expand Down Expand Up @@ -1165,8 +1157,8 @@ static struct aws_mqtt_request_response_client *s_aws_mqtt_request_response_clie
&rr_client->operations,
allocator,
MQTT_RR_CLIENT_OPERATION_TABLE_DEFAULT_SIZE,
aws_mqtt_hash_uint64_t,
aws_mqtt_compare_uint64_t_eq,
aws_hash_uint64_t,
aws_hash_compare_uint64_t_eq,
NULL,
NULL);

Expand Down

0 comments on commit cbb958e

Please sign in to comment.