Browse Source

Merge branch 'master' into IPS-197

IPS-197
Dirk Zimmermann 7 months ago
parent
commit
20cd2595a8
4 changed files with 28 additions and 6 deletions
  1. +20
    -0
      build-linux/Makefile
  2. +1
    -2
      src/PEPBlockBasedTransport.m
  3. +2
    -3
      src/TransportDelegates/PEPBlockBasedTransport+IncomingMessageDelegate.m
  4. +5
    -1
      src/TransportDelegates/PEPBlockBasedTransport+SendToResultDelegate.m

+ 20
- 0
build-linux/Makefile View File

@ -0,0 +1,20 @@
# Content of this library
TARGET = libPEPTransport
OBJECTS = $(call find-objects,../src)
DEPFILES = $(call find-deps,../src)
HEADERS = $(call find-headers,../PublicHeaders/)
# Dependencies *within* this repo (other headers should be installed and found in $PREFIX).
INCLUDES = \
$(call find-includes,..) \
-I$(PEP_INCLUDE) \
# Only for making .so libs. Libs for static linking are defined with the final binary.
LIBS =
# Load the shared pEp ObjC Makefile.
MAKEFILE_COMMON ?= ../../../../pepgnustephelper/
include $(MAKEFILE_COMMON)/Makefile.common
# This enables proper header-dependencies based on .d files made by the compiler.
include $(DEPFILES)

+ 1
- 2
src/PEPBlockBasedTransport.m View File

@ -121,8 +121,7 @@
return;
}
// Message IDs must be unique, or we'll have problems. Let's find out rather sooner,
// during development, than later.
// Make sure there are not already callbacks existing for the message ID.
PEPTransportStatusCallbacks *existingCallbacks = [self.messageCallbacks objectForKey:messageID];
NSAssert(existingCallbacks == nil,
@"Sending a message with a message ID that is currently in the process of sending is not supported");


+ 2
- 3
src/TransportDelegates/PEPBlockBasedTransport+IncomingMessageDelegate.m View File

@ -19,9 +19,8 @@
transportStatusCode:&statusCodeFromUnderlyingTransport
error:&error];
if (message == nil) {
// Weird case, but nothing to relay to the delegate.
// For now, assume implementation error.
NSAssert(NO, @"Underlying transport signaled new message, but could not read it");
// Weird case, but nothing to relay to the delegate, so ignore.
NSAssert(NO, @"Underlying transport signaled new message, but there was none");
} else {
[self.transportDelegate signalIncomingMessage:message
transportID:transportID


+ 5
- 1
src/TransportDelegates/PEPBlockBasedTransport+SendToResultDelegate.m View File

@ -41,8 +41,12 @@
statusCode:(PEPTransportStatusCode)statusCode {
PEPTransportStatusCallbacks *callbacks = [self findAndRemoveCallbacksForMessageID:messageID];
// That would look like a developer error.
// If we don't find the matching callbacks for this message ID,
// there's nothing we can do.
NSAssert(callbacks != nil, @"Got called with message send result, but no callback");
if (callbacks == nil) {
return;
}
if ([PEPTransportStatusCodeUtil isErrorStatusCode:statusCode] ||
[PEPTransportStatusCodeUtil isCriticalErrorStatusCode:statusCode]) {


Loading…
Cancel
Save