Mir

Code review comment for lp:~robertcarr/mir/implement-client-credentials

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

706 - // TODO the code between here and "return" doesn't change error
707 - // TODO does it do anything useful?
708 - struct sockaddr_un remote;
709 - auto sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
710 - remote.sun_family = AF_UNIX;
711 - strcpy(remote.sun_path, socket_file.c_str());
712 - auto len = strlen(remote.sun_path) + sizeof(remote.sun_family);
713 -
714 - do
715 - {
716 - std::this_thread::sleep_for(std::chrono::milliseconds(0));
717 - }
718 - while ((connect(sockfd, (struct sockaddr *)&remote, len) == -1)
719 - && (std::chrono::system_clock::now() < limit));
720 -
721 - close(sockfd);
722 -

I wish unrelated changes would go in separate MPs - it makes things easier to follow.

review: Approve

« Back to merge proposal