Skip to content

Commit dc7dcbd

Browse files
committed
Fix build errors: update all callers of changed function signatures
Three callers were missing the new use_ffm parameter: - aws_signing.c: aws_input_stream_new_from_java_http_request_body_stream() -> add false (signing path always uses JNI) - mqtt_connection.c: aws_apply_java_http_request_changes_to_native_request() -> add false (MQTT path always uses JNI) - mqtt5_client.c: aws_apply_java_http_request_changes_to_native_request() -> add false (MQTT5 path always uses JNI) Also fix the unused-parameter warning in http_request_utils.c: - aws_apply_java_http_request_changes_to_native_request() now passes use_ffm through to aws_input_stream_new_from_java_http_request_body_stream() instead of hardcoding false, making the parameter actually used.
1 parent ad56b5f commit dc7dcbd

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/native/aws_signing.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ void JNICALL Java_software_amazon_awssdk_crt_auth_signing_AwsSigner_awsSignerSig
494494
AWS_FATAL_ASSERT(callback_data->java_original_chunk_body != NULL);
495495

496496
callback_data->chunk_body_stream = aws_input_stream_new_from_java_http_request_body_stream(
497-
aws_jni_get_allocator(), env, java_chunk_body_stream);
497+
aws_jni_get_allocator(), env, java_chunk_body_stream, false /* use_ffm: signing path uses JNI */);
498498
if (callback_data->chunk_body_stream == NULL) {
499499
aws_jni_throw_runtime_exception(env, "Error building chunk body stream");
500500
goto on_error;

src/native/http_request_utils.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,9 @@ int aws_apply_java_http_request_changes_to_native_request(
435435
}
436436

437437
if (jni_body_stream) {
438-
/* use_ffm=false here: this path is used by non-S3 HTTP requests that
439-
* don't go through the FFM meta-request path. */
438+
/* Pass use_ffm through so the stream uses the correct callback path. */
440439
struct aws_input_stream *body_stream = aws_input_stream_new_from_java_http_request_body_stream(
441-
aws_jni_get_allocator(), env, jni_body_stream, false);
440+
aws_jni_get_allocator(), env, jni_body_stream, use_ffm);
442441

443442
aws_http_message_set_body_stream(message, body_stream);
444443
/* request controls the lifetime of body stream fully */

src/native/mqtt5_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,7 @@ JNIEXPORT void JNICALL Java_software_amazon_awssdk_crt_mqtt5_Mqtt5Client_mqtt5Cl
16501650
}
16511651

16521652
if (aws_apply_java_http_request_changes_to_native_request(
1653-
env, jni_marshalled_request, NULL, ws_handshake->http_request)) {
1653+
env, jni_marshalled_request, NULL, ws_handshake->http_request, false /* use_ffm: MQTT5 path uses JNI */)) {
16541654
error_code = aws_last_error();
16551655
goto done;
16561656
}

src/native/mqtt_connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ void JNICALL Java_software_amazon_awssdk_crt_mqtt_MqttClientConnection_mqttClien
12901290
}
12911291

12921292
if (aws_apply_java_http_request_changes_to_native_request(
1293-
env, jni_marshalled_request, NULL, ws_handshake->http_request)) {
1293+
env, jni_marshalled_request, NULL, ws_handshake->http_request, false /* use_ffm: MQTT path uses JNI */)) {
12941294
error_code = aws_last_error();
12951295
goto done;
12961296
}

0 commit comments

Comments
 (0)