Commit b224c388 by Logan Collins Committed by Carlos Martín Nieto

Fix in stransport_stream.c for usage of SecCopyErrorMessageString(), which is…

Fix in stransport_stream.c for usage of SecCopyErrorMessageString(), which is unavailable to iOS targets.
parent d4723c89
...@@ -24,11 +24,16 @@ int stransport_error(OSStatus ret) ...@@ -24,11 +24,16 @@ int stransport_error(OSStatus ret)
return 0; return 0;
} }
#if !TARGET_OS_IPHONE
message = SecCopyErrorMessageString(ret, NULL); message = SecCopyErrorMessageString(ret, NULL);
GITERR_CHECK_ALLOC(message); GITERR_CHECK_ALLOC(message);
giterr_set(GITERR_NET, "SecureTransport error: %s", CFStringGetCStringPtr(message, kCFStringEncodingUTF8)); giterr_set(GITERR_NET, "SecureTransport error: %s", CFStringGetCStringPtr(message, kCFStringEncodingUTF8));
CFRelease(message); CFRelease(message);
#else
giterr_set(GITERR_NET, "SecureTransport error: OSStatus %d", (unsigned int)ret);
#endif
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment