[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] dumpOSC



I also started to look into this. There were some commits to deal with nested bundles IIRC, which I think might have been where it broke. 

S.

On 24 Nov 2013, at 20:57, Julian Rohrhuber <julian.rohrhuber@xxxxxxxxxxxxxxxxxx> wrote:

> as the broken dumpOSC is a little bit like having lost the last screwdriver, I have had a look if I can fix it with my limited means.
> 
> Trying to trace it down, using full text search, is this method that should be called, but apparently isn't:
> 
> SC_OscUtils.hpp:
> 
> static void dumpOSC(int mode, int size, char* inData)
> {
> 	printf("here I am: dumpOSC\n"); // I added this.
> 	if (mode & 1)
> 	{
> 		int indent = 0;
> 		bool contentPrinted;
> 
> 		if (strcmp(inData, "#bundle") == 0)
> 			contentPrinted = dumpOSCbndl(indent, size, inData);
> 		else
> 			contentPrinted = dumpOSCmsg(size, inData);
> 
> 		if (contentPrinted)
> 			scprintf("\n");
> 	}
> 
> 	if (mode & 2) hexdump(size, inData);
> }
> 
> I also added a debugging statement in SC_MiscCmds.cpp:
> 
> SCErr meth_dumpOSC(World *inWorld, int inSize, char *inData, ReplyAddress *inReply);
> SCErr meth_dumpOSC(World *inWorld, int inSize, char *inData, ReplyAddress *inReply)
> {
> 	sc_msg_iter msg(inSize, inData);
> 	inWorld->mDumpOSC = msg.geti();
> 		printf("meth_dumpOSC: %i\n", inWorld->mDumpOSC);
> 	return kSCErr_None;
> }
> 
> Here I get a correct response.
> It seems that the method is never called (in SC_ComPort.cpp)
> 
> 
> SC_DLLEXPORT_C bool World_SendPacketWithContext(World *inWorld, int inSize, char *inData, ReplyFunc inFunc, void *inContext)
> {
> 	if (inSize > 0) {
> 		printf("World_SendPacketWithContext\n");
> 		//if (inWorld->mDumpOSC) dumpOSC(inWorld->mDumpOSC, inSize, inData);
> 		dumpOSC(inWorld->mDumpOSC, inSize, inData);
> 
> 		OSC_Packet* packet = (OSC_Packet*)malloc(sizeof(OSC_Packet));
> 
> 		packet->mReplyAddr.mAddress = boost::asio::ip::address();
> 		packet->mReplyAddr.mReplyFunc = inFunc;
> 		packet->mReplyAddr.mReplyData = inContext;
> 		packet->mReplyAddr.mSocket = 0;
> 
> 		if(!UnrollOSCPacket(inWorld, inSize, inData, packet)) {
> 			free(packet);
> 			return false;
> 		}
> 	}
> 	return true;
> }
> 
> SC_DLLEXPORT_C bool World_SendPacket(World *inWorld, int inSize, char *inData, ReplyFunc inFunc)
> {
> 	return World_SendPacketWithContext(inWorld, inSize, inData, inFunc, 0);
> }
> 
> 
> Any clues?
> _______________________________________________
> sc-dev mailing list
> 
> info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-dev/
> search: https://listarc.bham.ac.uk/lists/sc-dev/search/


_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/