-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement auto attach #2250
Implement auto attach #2250
Conversation
The login_token_lookup RPC returns different things in the 2 cases
…into dpa_autologin_client
People doing early testing of autologin may need to delete old files.
…into dpa_autologin_client
… before displaying the "Communicating with client" dialog from 1.5 seconds to 60 second. This allows for the time the auto-attach may take before GUI RPCs are enabled. But we do display it after 60 seconds a a safety feature, so that the user can exit BOINC if the client hangs.
…into dpa_autologin_client # By David Anderson # Via David Anderson * 'dpa_autologin_client' of https://github.com/BOINC/boinc: Win installer: don't overwrite project list file. login_token_lookup RPC: make it work for account managers too Client: make autologin work for account managers as well as projects.
…ller file name has been modified
From pull request #2207 after the merge, @CharlieFenton commented:
|
The client took "account_data.txt" as an account file, causing a spurious error message.
Also remove no-projects-attached message; confusing in autologin case.
…ch wizard The way things work now, autologin is completed before this code is reached (since it follows a GUI RPC)
@davidpanderson: The last lines in GET_PROJECT_LIST_OP::handle_reply() are:
So this RPC will alway call If project_id has never been set so it is not a valid project id, the Event log will display "Unknown project ID: project_id". If project_id has never been set but it is a random valid project id, the client will attach to an unintended project. (Static variables are automatically initialized to 0 on the Mac; i don't know if this is true on all platforms.) If there was an auto-attach when the client was first started, it will display "Already attached to project_name" . I believe you need to add:
I suspect this is what you intended by the comment |
Section 6.7.8 Initialization of C99 standard (n1256) answers this question: If an object that has automatic storage duration is not initialized explicitly, its value is indeterminate. If an object that has static storage duration is not initialized explicitly, then: — if it has pointer type, it is initialized to a null pointer; — if it has arithmetic type, it is initialized to (positive or unsigned) zero; — if it is an aggregate, every member is initialized (recursively) according to these rules; — if it is a union, the first named member is initialized (recursively) according to these rules. |
@davidpanderson: i think a race condition might be possible if there is an auto-attach with a virgin install or with a new version of BOINC on top of an older version. Say that the local all_projects_list.xml file does contain the project id in the token, so |
Oops! Fixed. |
Good eye! That is indeed a problem. I committed a fix. |
@davidpanderson: I see that the merge conflict is due to your removal of this code from client_state.cpp:
But I think we still want to display these messages when there is no login_token.txt file and no BOINC Manager is running (which would run the Attach Wizard.) There is probably no harm in displaying the messages even if the BOINC Manager displays the Attach Wizard. So I suggest keeping the above code, but executing it only if |
The first message is OK. |
I restored the first message to be displayed only if not doing an autologin, and resolved the merge conflict. I believe this PR is now ready to be merged into Master, assuming that all checks pass. |
@davidpanderson - if this is ready for final review, can you remove WIP from the title of the pull request? @AenBleidd - was the item that you raised fixed? @CharlieFenton or @davidpanderson have either of you built the server and client from the latest version branch and done testing on this or would you like me to do so before merging? |
@TheAspens, actually that was just an answer on @CharlieFenton question. |
I haven't. I am waiting for the server code to be implemented on SETI@home to do further testing, since @davidpanderson wrote in PR #2241 16 days ago:
|
Will Erik deploy it to Seti@Home from this branch or is the intention for him to deploy from master after it is merged? |
I've also now tested this and I'm ready to merge. Everyone who has commented on this pull request is not objecting either. @davidpanderson - if you can confirm that you want this merged now, then I will merge. |
OK to merge. SETI@home is in the process of upgrading their beta test software to master. They'll pull this in there, and then deploy on their production server, at which point we'll be able to do and end-to-end test and do a client test/release. |
@SETIguy |
This pull request is a continuation of PR #2207 which has been merged.