Skip to content
Snippets Groups Projects

network: use a function to turn network errors into string

Closed Steve Lhomme requested to merge robUx4/vlc:net_errno-str into master
2 unresolved threads

So whether we decide to turn network errors into errno or keep using net_errno, the code logging network errors won't need to change.

Also report bind() errors early which both simplifies the code and make the log order more logical on Linux.


v2: poll sets errno on all error pathes on Windows, so don't use net_errno to report poll errors.

Edited by Steve Lhomme

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
241 238 ptr->ai_protocol);
242 239 if (fd == -1)
243 240 {
244 msg_Dbg (p_this, "socket error: %s", vlc_strerror_c(net_errno));
241 msg_Dbg (p_this, "socket error: %s", vlc_net_strerror_c());
245 242 continue;
246 243 }
247 244
248 245 /* Bind the socket */
249 246 if (bind (fd, ptr->ai_addr, ptr->ai_addrlen))
250 247 {
251 int err = net_errno;
248 msg_Err (p_this, "socket bind error: %s", vlc_net_strerror_c());
  • added MRStatus::Stale label and removed MRStatus::InReview label

  • Steve Lhomme mentioned in merge request !2496 (merged)

    mentioned in merge request !2496 (merged)

  • Author Developer

    We don't really a function for a single call with the same parameter.

  • closed

  • Please register or sign in to reply
    Loading