@@ -482,22 +482,20 @@ sentry_user_consent_is_required(void)
482482}
483483
484484void
485- sentry__capture_envelope (
486- sentry_transport_t * transport , sentry_envelope_t * envelope )
485+ sentry__capture_envelope (sentry_transport_t * transport ,
486+ sentry_envelope_t * envelope , const sentry_options_t * options )
487487{
488- if (!sentry__should_skip_upload ( )) {
488+ if (!sentry__run_should_skip_upload ( options -> run )) {
489489 sentry__transport_send_envelope (transport , envelope );
490490 return ;
491491 }
492492 bool cached = false;
493- SENTRY_WITH_OPTIONS (options ) {
494- if (options -> cache_keep || options -> http_retry ) {
495- cached = sentry__run_write_cache (options -> run , envelope , 0 );
496- if (cached && !sentry__run_should_skip_upload (options -> run )) {
497- // consent given meanwhile -> trigger retry to avoid waiting
498- // until the next retry poll
499- sentry_transport_retry (options -> transport );
500- }
493+ if (options -> cache_keep || options -> http_retry ) {
494+ cached = sentry__run_write_cache (options -> run , envelope , 0 );
495+ if (cached && !sentry__run_should_skip_upload (options -> run )) {
496+ // consent given meanwhile -> trigger retry to avoid waiting
497+ // until the next retry poll
498+ sentry_transport_retry (options -> transport );
501499 }
502500 }
503501 SENTRY_INFO (cached ? "caching envelope due to missing user consent"
@@ -512,7 +510,7 @@ sentry_capture_envelope(sentry_envelope_t *envelope)
512510 return ;
513511 }
514512 SENTRY_WITH_OPTIONS (options ) {
515- sentry__capture_envelope (options -> transport , envelope );
513+ sentry__capture_envelope (options -> transport , envelope , options );
516514 }
517515}
518516
@@ -621,7 +619,7 @@ sentry__capture_event(sentry_value_t event, sentry_scope_t *local_scope)
621619 SENTRY_DATA_CATEGORY_ERROR , 1 );
622620 sentry_envelope_free (envelope );
623621 } else {
624- sentry__capture_envelope (options -> transport , envelope );
622+ sentry__capture_envelope (options -> transport , envelope , options );
625623 was_sent = true;
626624 }
627625 }
@@ -1630,7 +1628,7 @@ sentry_capture_user_feedback(sentry_value_t user_report)
16301628 SENTRY_WITH_OPTIONS (options ) {
16311629 envelope = prepare_user_report (user_report );
16321630 if (envelope ) {
1633- sentry__capture_envelope (options -> transport , envelope );
1631+ sentry__capture_envelope (options -> transport , envelope , options );
16341632 }
16351633 }
16361634 sentry_value_decref (user_report );
@@ -1652,7 +1650,7 @@ sentry_capture_feedback_with_hint(
16521650 SENTRY_WITH_OPTIONS (options ) {
16531651 envelope = prepare_user_feedback (user_feedback , hint );
16541652 if (envelope ) {
1655- sentry__capture_envelope (options -> transport , envelope );
1653+ sentry__capture_envelope (options -> transport , envelope , options );
16561654 }
16571655 }
16581656
@@ -1765,7 +1763,7 @@ sentry_capture_minidump_n(const char *path, size_t path_len)
17651763 sentry__envelope_item_set_header (item , "filename" ,
17661764 sentry_value_new_string (sentry__path_filename (dump_path )));
17671765
1768- sentry__capture_envelope (options -> transport , envelope );
1766+ sentry__capture_envelope (options -> transport , envelope , options );
17691767
17701768 SENTRY_INFOF (
17711769 "Minidump has been captured: \"%s\"" , dump_path -> path );
0 commit comments