Closed
Bug 1206465
Opened 9 years ago
Closed 9 years ago
Remove ice_ctx from TestStunTcpServer
Categories
(Core :: WebRTC: Networking, defect, P1)
Core
WebRTC: Networking
Tracking
()
RESOLVED
FIXED
mozilla44
backlog | webrtc/webaudio+ |
People
(Reporter: drno, Assigned: drno)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
The TestStunTcpServer initializes an ice_ctx with TCP disabled, which gets written into the nICEr central shared registry. This results in single TCP test execution failing and currently the tests in ice_unittest having dependencies on each other.
Assignee | ||
Comment 1•9 years ago
|
||
Bug 1206465: removed ice_ctx from TestStunTcpServer. r?ekr,r?bwc
Attachment #8663362 -
Flags: review?(ekr)
Attachment #8663362 -
Flags: review?(docfaraday)
Comment 2•9 years ago
|
||
https://reviewboard.mozilla.org/r/19787/#review17855 There are some simplifications I'd like to see here. ::: media/mtransport/test/stunserver.cpp:394 (Diff revision 1) > + nr_socket *send_sock; > + Couldn't we just do if (!sock) {sock = send_sock_;}, and avoid the if/else below, and the extra variable? ::: media/mtransport/test/stunserver.cpp:591 (Diff revision 1) > +void TestStunTcpServer::readable_cb(NR_SOCKET s, int how, void *cb_arg) { I wonder how much we could simplify this by doing the following: 1) Adding virtual nr_socket\* GetSocket(NR_SOCKET s) to TestStunServer. 2) Making |connections\_| be a non-static member of TestStunTcpServer, as a std::map<NR_SOCKET, nr_socket\*> (so we can override GetSocket). 3) Unifying the two implementations of readable_cb, since the only real difference is now encapsulated in GetSocket() 4) Simplify (or eliminate) PreProcess since we don't need to have a conditional sock param. 5) Eliminate StunTcpReadOperation ::: media/mtransport/test/stunserver.cpp:592 (Diff revision 1) > + StunTcpReadOperation* ops = static_cast<StunTcpReadOperation*>(cb_arg); > + TestStunServer* server = ops->server_; Inconsistent \* ::: media/mtransport/test/stunserver.cpp:595 (Diff revision 1) > + nr_socket* sock = static_cast<nr_socket *>(static_cast<nr_socket_wrapped *>(wrapped_sock->obj)->sock_); Why do we need the static_cast<nr_socket\*> here? sock\_ is already an nr_socket\*. Also, inconsistent \* ::: media/mtransport/test/stunserver.cpp:596 (Diff revision 1) > + char message[4096]; Let's give this a constant a name, since it is used in two places now.
Updated•9 years ago
|
Attachment #8663362 -
Flags: review?(docfaraday)
Updated•9 years ago
|
backlog: --- → webrtc/webaudio+
Rank: 15
Priority: -- → P1
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8663362 [details] MozReview Request: Bug 1206465: removed ice_ctx from TestStunTcpServer. r?bwc Bug 1206465: removed ice_ctx from TestStunTcpServer. r?bwc
Attachment #8663362 -
Attachment description: MozReview Request: Bug 1206465: removed ice_ctx from TestStunTcpServer. r?ekr,r?bwc → MozReview Request: Bug 1206465: removed ice_ctx from TestStunTcpServer. r?bwc
Attachment #8663362 -
Flags: review?(ekr) → review?(docfaraday)
Assignee | ||
Comment 5•9 years ago
|
||
https://reviewboard.mozilla.org/r/19787/#review17855 > I wonder how much we could simplify this by doing the following: > > 1) Adding virtual nr_socket\* GetSocket(NR_SOCKET s) to TestStunServer. > 2) Making |connections\_| be a non-static member of TestStunTcpServer, as a std::map<NR_SOCKET, nr_socket\*> (so we can override GetSocket). > 3) Unifying the two implementations of readable_cb, since the only real difference is now encapsulated in GetSocket() > 4) Simplify (or eliminate) PreProcess since we don't need to have a conditional sock param. > 5) Eliminate StunTcpReadOperation Thanks, that was a good idea.
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8663362 [details] MozReview Request: Bug 1206465: removed ice_ctx from TestStunTcpServer. r?bwc Bug 1206465: removed ice_ctx from TestStunTcpServer. r?bwc
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8663362 [details] MozReview Request: Bug 1206465: removed ice_ctx from TestStunTcpServer. r?bwc Bug 1206465: removed ice_ctx from TestStunTcpServer. r?ekr,r?bwc
Attachment #8663362 -
Attachment description: MozReview Request: Bug 1206465: removed ice_ctx from TestStunTcpServer. r?bwc → MozReview Request: Bug 1206465: removed ice_ctx from TestStunTcpServer. r?ekr,r?bwc
Attachment #8663362 -
Flags: review?(ekr)
Assignee | ||
Comment 8•9 years ago
|
||
Bug 1207451: removed framing from multi_tcp API. r?bwc
Attachment #8664651 -
Flags: review?(docfaraday)
Assignee | ||
Updated•9 years ago
|
Attachment #8664651 -
Attachment is obsolete: true
Attachment #8664651 -
Flags: review?(docfaraday)
Comment 9•9 years ago
|
||
It looks like you incorporated feedback, but the two subsequent pushes have undone all of the work.
Flags: needinfo?(drno)
Assignee | ||
Comment 10•9 years ago
|
||
Comment on attachment 8663362 [details] MozReview Request: Bug 1206465: removed ice_ctx from TestStunTcpServer. r?bwc Bug 1206465: removed ice_ctx from TestStunTcpServer. r?bwc
Attachment #8663362 -
Attachment description: MozReview Request: Bug 1206465: removed ice_ctx from TestStunTcpServer. r?ekr,r?bwc → MozReview Request: Bug 1206465: removed ice_ctx from TestStunTcpServer. r?bwc
Attachment #8663362 -
Flags: review?(ekr)
Assignee | ||
Comment 11•9 years ago
|
||
(In reply to Byron Campen [:bwc] from comment #9) > It looks like you incorporated feedback, but the two subsequent pushes have > undone all of the work. Yea that subsequent push didn't go as intended.
Flags: needinfo?(drno)
Comment 12•9 years ago
|
||
Did you want me to try to review it as it stands now, or did you want to fix the push first?
Flags: needinfo?(drno)
Assignee | ||
Comment 13•9 years ago
|
||
(In reply to Byron Campen [:bwc] from comment #12) > Did you want me to try to review it as it stands now, or did you want to fix > the push first? The push from comment #10 should have restored the good version from comment #6. So yes, please go ahead a review :-)
Flags: needinfo?(drno)
Comment 14•9 years ago
|
||
Comment on attachment 8663362 [details] MozReview Request: Bug 1206465: removed ice_ctx from TestStunTcpServer. r?bwc https://reviewboard.mozilla.org/r/19789/#review18435
Attachment #8663362 -
Flags: review?(docfaraday) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 15•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d990673dc675
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d990673dc675
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•