Closed Bug 1252171 Opened 4 years ago Closed 4 years ago

TestNrSocket does not update last-used timestamps for TCP port mappings

Categories

(Core :: WebRTC: Networking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed
Blocking Flags:

People

(Reporter: bwc, Assigned: bwc)

Details

Attachments

(1 file)

No description provided.
https://reviewboard.mozilla.org/r/37205/#review33735

::: media/mtransport/test_nr_socket.cpp:498
(Diff revision 1)
>      MOZ_ASSERT(port_mappings_.size() == 1);
> -    return port_mappings_.front()->external_socket_->read(buf, maxlen, len);
> +    int read = port_mappings_.front()->external_socket_->read(buf, maxlen, len);
> +    if (read > 0 && nat_->refresh_on_ingress_) {
> +      port_mappings_.front()->last_used_ = PR_IntervalNow();
> +    }
> +    return read;
>    }
>  }

Don't name this "read" because it's s libc symbol

::: media/mtransport/test_nr_socket.cpp:499
(Diff revision 1)
> -    return port_mappings_.front()->external_socket_->read(buf, maxlen, len);
> +    int read = port_mappings_.front()->external_socket_->read(buf, maxlen, len);
> +    if (read > 0 && nat_->refresh_on_ingress_) {
> +      port_mappings_.front()->last_used_ = PR_IntervalNow();
> +    }
> +    return read;
>    }
>  }
>  

Please don't name this "read", because that's a system primitive
backlog: --- → webrtc/webaudio+
Rank: 25
Priority: -- → P2
Comment on attachment 8724853 [details]
MozReview Request: Bug 1252171: Update last_used_ on TCP port mappings when they are used, similar to UDP. r?drno

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/37205/diff/1-2/
Attachment #8724853 - Attachment description: MozReview Request: Bug 1252171: Update last_used_ on TCP port mappings when they are used, similar to UDP. → MozReview Request: Bug 1252171: Update last_used_ on TCP port mappings when they are used, similar to UDP. r?drno
Attachment #8724853 - Flags: review?(drno)
Comment on attachment 8724853 [details]
MozReview Request: Bug 1252171: Update last_used_ on TCP port mappings when they are used, similar to UDP. r?drno

https://reviewboard.mozilla.org/r/37205/#review34201
Attachment #8724853 - Flags: review?(drno) → review+
https://hg.mozilla.org/mozilla-central/rev/61519a71531e
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.