diff options
Diffstat (limited to 'swift/src/Ice')
-rw-r--r-- | swift/src/Ice/Incoming.swift | 10 | ||||
-rw-r--r-- | swift/src/Ice/OutputStream.swift | 2 | ||||
-rw-r--r-- | swift/src/Ice/Proxy.swift | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/swift/src/Ice/Incoming.swift b/swift/src/Ice/Incoming.swift index 632b3ace78e..2d7b3029a06 100644 --- a/swift/src/Ice/Incoming.swift +++ b/swift/src/Ice/Incoming.swift @@ -98,14 +98,14 @@ public final class Incoming { } public func setResult() -> Promise<OutputStream>? { - let ostr = OutputStream(communicator: istr.communicator, encoding: current.encoding) + let ostr = OutputStream(communicator: istr.communicator) ostr.writeEmptyEncapsulation(current.encoding) self.ostr = ostr return nil // Response is cached in the Incoming to not have to create unnecessary future } public func setResult(_ cb: (OutputStream) -> Void) -> Promise<OutputStream>? { - let ostr = OutputStream(communicator: istr.communicator, encoding: current.encoding) + let ostr = OutputStream(communicator: istr.communicator) ostr.startEncapsulation(encoding: current.encoding, format: format) cb(ostr) ostr.endEncapsulation() @@ -116,7 +116,7 @@ public final class Incoming { public func setResultPromise(_ p: Promise<Void>) -> Promise<OutputStream> { // Use the thread which fulfilled the promise (on: nil) return p.map(on: nil) { - let ostr = OutputStream(communicator: self.istr.communicator, encoding: self.current.encoding) + let ostr = OutputStream(communicator: self.istr.communicator) ostr.writeEmptyEncapsulation(self.current.encoding) return ostr } @@ -126,7 +126,7 @@ public final class Incoming { _ cb: @escaping (OutputStream, T) -> Void) -> Promise<OutputStream> { // Use the thread which fulfilled the promise (on: nil) return p.map(on: nil) { t in - let ostr = OutputStream(communicator: self.istr.communicator, encoding: self.current.encoding) + let ostr = OutputStream(communicator: self.istr.communicator) ostr.startEncapsulation(encoding: self.current.encoding, format: self.format) cb(ostr, t) ostr.endEncapsulation() @@ -210,7 +210,7 @@ public final class Incoming { return } ok = false // response will contain a UserException - let ostr = OutputStream(communicator: istr.communicator, encoding: current.encoding) + let ostr = OutputStream(communicator: istr.communicator) ostr.startEncapsulation(encoding: current.encoding, format: format) ostr.write(e) ostr.endEncapsulation() diff --git a/swift/src/Ice/OutputStream.swift b/swift/src/Ice/OutputStream.swift index 692ca753ea4..199a91af590 100644 --- a/swift/src/Ice/OutputStream.swift +++ b/swift/src/Ice/OutputStream.swift @@ -532,7 +532,7 @@ public extension OutputStream { } internal func writeOptionalImpl(tag: Int32, format: OptionalFormat) -> Bool { - guard encoding != Encoding_1_0 else { + guard currentEncoding != Encoding_1_0 else { return false } diff --git a/swift/src/Ice/Proxy.swift b/swift/src/Ice/Proxy.swift index 72cc73fd352..c46cd965807 100644 --- a/swift/src/Ice/Proxy.swift +++ b/swift/src/Ice/Proxy.swift @@ -1157,7 +1157,7 @@ open class ObjectPrxI: ObjectPrx { throw TwowayOnlyException(operation: operation) } - let ostr = OutputStream(communicator: communicator, encoding: encoding) + let ostr = OutputStream(communicator: communicator) if let write = write { ostr.startEncapsulation(encoding: encoding, format: format) write(ostr) @@ -1208,7 +1208,7 @@ open class ObjectPrxI: ObjectPrx { if !isTwoway { throw TwowayOnlyException(operation: operation) } - let ostr = OutputStream(communicator: communicator, encoding: encoding) + let ostr = OutputStream(communicator: communicator) if let write = write { ostr.startEncapsulation(encoding: encoding, format: format) write(ostr) @@ -1259,7 +1259,7 @@ open class ObjectPrxI: ObjectPrx { if userException != nil, !isTwoway { return Promise(error: TwowayOnlyException(operation: operation)) } - let ostr = OutputStream(communicator: communicator, encoding: encoding) + let ostr = OutputStream(communicator: communicator) if let write = write { ostr.startEncapsulation(encoding: encoding, format: format) write(ostr) @@ -1340,7 +1340,7 @@ open class ObjectPrxI: ObjectPrx { if !isTwoway { return Promise(error: TwowayOnlyException(operation: operation)) } - let ostr = OutputStream(communicator: communicator, encoding: encoding) + let ostr = OutputStream(communicator: communicator) if let write = write { ostr.startEncapsulation(encoding: encoding, format: format) write(ostr) |