1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Ground: Fix bug in serial port opening for OSX. I could have put another compile switch in serialplugin.cpp but making this function return in the same format as linux made more sense. Just make sure this doesn't get clobbered from upstream in future.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1386 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2010-08-23 05:13:43 +00:00 committed by peabody124
parent beac0c0ea9
commit 82f7f42112

View File

@ -110,14 +110,14 @@ bool QextSerialEnumerator::getServiceDetailsOSX( io_object_t service, QextPortIn
io_string_t ioPathName;
IORegistryEntryGetPath( service, kIOServicePlane, ioPathName );
portInfo->physName = ioPathName;
portInfo->portName = ioPathName;
if( bsdPathAsCFString )
{
char path[MAXPATHLEN];
if( CFStringGetCString((CFStringRef)bsdPathAsCFString, path,
PATH_MAX, kCFStringEncodingUTF8) )
portInfo->portName = path;
portInfo->physName = path;
CFRelease(bsdPathAsCFString);
}