Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boinc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
boinc
Commits
d2824758
Commit
d2824758
authored
10 years ago
by
Rom Walton
Browse files
Options
Downloads
Patches
Plain Diff
VBOX: Always report the web graphics port to the client except when a 'graphics_app' is defined
parent
91bb400c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
samples/vboxwrapper/vboxwrapper.cpp
+8
-12
8 additions, 12 deletions
samples/vboxwrapper/vboxwrapper.cpp
with
8 additions
and
12 deletions
samples/vboxwrapper/vboxwrapper.cpp
+
8
−
12
View file @
d2824758
...
...
@@ -263,22 +263,18 @@ void set_floppy_image(APP_INIT_DATA& aid, VBOX_VM& vm) {
// if there's a port for web graphics, tell the client about it
//
void
se
t_web_graphics_url
(
VBOX_VM
&
vm
)
{
void
repor
t_web_graphics_url
(
VBOX_VM
&
vm
)
{
char
buf
[
256
];
for
(
unsigned
int
i
=
0
;
i
<
vm
.
port_forwards
.
size
();
i
++
)
{
VBOX_PORT_FORWARD
&
pf
=
vm
.
port_forwards
[
i
];
if
(
pf
.
guest_port
==
vm
.
pf_guest_port
)
{
sprintf
(
buf
,
"http://localhost:%d"
,
pf
.
host_port
);
if
(
vm
.
pf_host_port
&&
!
boinc_file_exists
(
"graphics_app"
))
{
sprintf
(
buf
,
"http://localhost:%d"
,
vm
.
pf_host_port
);
vboxlog_msg
(
"Detected: Web Application Enabled (%s)"
,
buf
);
boinc_web_graphics_url
(
buf
);
break
;
}
}
}
// set remote desktop information if needed
//
void
se
t_remote_desktop_info
(
VBOX_VM
&
vm
)
{
void
repor
t_remote_desktop_info
(
VBOX_VM
&
vm
)
{
char
buf
[
256
];
if
(
vm
.
rd_host_port
)
{
sprintf
(
buf
,
"localhost:%d"
,
vm
.
rd_host_port
);
...
...
@@ -853,8 +849,8 @@ int main(int argc, char** argv) {
}
set_floppy_image
(
aid
,
*
pVM
);
se
t_web_graphics_url
(
*
pVM
);
se
t_remote_desktop_info
(
*
pVM
);
repor
t_web_graphics_url
(
*
pVM
);
repor
t_remote_desktop_info
(
*
pVM
);
checkpoint
.
webapi_port
=
pVM
->
pf_host_port
;
checkpoint
.
remote_desktop_port
=
pVM
->
rd_host_port
;
checkpoint
.
update
(
elapsed_time
,
current_cpu_time
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment