m-lab / ndt

Network Diagnostic Tool
Other
11 stars 7 forks source link

Change raw_write usage to writen_any. #31

Closed pboothe closed 8 years ago

pboothe commented 8 years ago

raw_write is unsafe in the presence of websockets, and it relies too heavily on write() and SSL_write having the same error semantics. Use writen_any instead.

stephen-soltesz commented 8 years ago

write_raw & write_ssl - returns

writen_any - returns

send_msg_any - uses return value from writen_any

Consistent return values / semantics by these functions would improve understandability.

There are some checks for impossible return values.

pboothe commented 8 years ago

Standardized things on write()'s semantics instead of on SSL_write()'s semantics. Updated write_raw and write_ssl.

stephen-soltesz commented 8 years ago

"git push"? There are no new commits atm.

pboothe commented 8 years ago

Yes, I got occupied by getting the unit tests to pass, which has required work because we changed mlab_builder's network connection. I'll send a PTAL when it is good to go.

pboothe commented 8 years ago

PTAL

stephen-soltesz commented 8 years ago

Completed second round of comments.

pboothe commented 8 years ago

PTAL

stephen-soltesz commented 8 years ago

Third round of comments complete.

pboothe commented 8 years ago

PTAL

stephen-soltesz commented 8 years ago

Thank you. LGTM.