Removed "sim/" auto add feature
Removed “sim/“ auto add feature. There are some drefs (custom/art) that do not start with “sim/“
This commit is contained in:
@@ -829,7 +829,6 @@ int handleGETD(char buf[])
|
||||
{
|
||||
if (listLength > 0)
|
||||
{
|
||||
handleDREFSIM(DREFArray[i]);// Adds "sim/" if not present
|
||||
connectionList[current_connection].XPLMRequestedDRefs[i] = XPLMFindDataRef(DREFArray[i]);
|
||||
}
|
||||
|
||||
@@ -908,8 +907,6 @@ int handleDREF(char buf[])
|
||||
}
|
||||
|
||||
// Handle DREF
|
||||
handleDREFSIM(DREF);// Adds "sim/" if not present
|
||||
|
||||
sprintf(logmsg,"[DREF] Request to set DREF value received (Conn %i): %s",current_connection+1,DREF);
|
||||
updateLog(logmsg,strlen(logmsg));
|
||||
|
||||
|
||||
Binary file not shown.
@@ -304,23 +304,6 @@ unsigned short getIP(struct sockaddr recvaddr, char *IP)
|
||||
return ntohs((*sendaddr).sin_port);
|
||||
}
|
||||
|
||||
int handleDREFSIM(char *DREF)
|
||||
{
|
||||
//checks if sim/ is at the beginning of the dref string. If not, adds it.
|
||||
char firstFour[5] = {0};
|
||||
char fullDREF[200] = {0};
|
||||
|
||||
memcpy(firstFour,DREF,4);
|
||||
|
||||
if (strcmp(firstFour,"sim/") != 0)
|
||||
{
|
||||
sprintf(fullDREF, "sim/%s",DREF);
|
||||
memcpy(DREF,fullDREF,strlen(fullDREF));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// DEBUGGING TOOLS
|
||||
// --------------------------------
|
||||
int printBufferToLog(struct XPCMessage & msg)
|
||||
|
||||
@@ -41,9 +41,7 @@
|
||||
unsigned short getIP(struct sockaddr recvaddr, char *IP);
|
||||
|
||||
int printBufferToLog(struct XPCMessage & msg);
|
||||
|
||||
int handleDREFSIM(char *DREF);
|
||||
|
||||
|
||||
int fmini(int a, int b);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user