Skip to content

Commit

Permalink
Merge pull request #87 from dominikl/dont_set_port
Browse files Browse the repository at this point in the history
Don't set a default port
  • Loading branch information
jburel authored Feb 26, 2020
2 parents 20426dc + 0ffe351 commit 7c6fd41
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: romero.gateway
Type: Package
Version: 0.4.8
Version: 0.4.8.9000
Date: 2020-01-22
Title: OMERO R Gateway
Description: R Wrapper around the OMERO Java Gateway, which
Expand Down
18 changes: 9 additions & 9 deletions R/OMEROServer.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ OMEROServer <- setClass(

prototype = list(
host = character(0),
port= 4064L,
port = 0,
username = character(0),
password = character(0),
credentialsFile = character(0),
Expand Down Expand Up @@ -377,19 +377,19 @@ setMethod(f="connect",
username <- cred["omero.user", 1]
password <- cred["omero.pass", 1]
hostname <- cred["omero.host", 1]
portnumber <- cred["omero.port", 1]
portnumber <- as.integer(cred["omero.port", 1])
}

if (length(server@username)>0)
else {
username <- server@username
if (length(server@password)>0)
password <- server@password
if (length(server@host)>0)
hostname <- server@host
if (server@port>0)
portnumber <- server@port
portnumber <- as.integer(server@port)
}

lc <- new(LoginCredentials, username, password, hostname, as.integer(portnumber))
if (portnumber > 0)
lc <- new(LoginCredentials, username, password, hostname, portnumber)
else
lc <- new(LoginCredentials, username, password, hostname)
lc$setApplicationName("rOMERO")
if (!versioncheck) {
tryCatch({
Expand Down

0 comments on commit 7c6fd41

Please sign in to comment.