double* changed to char* in gui data call back, effect in receiver is change in zmqsocket.h from int* to char*

This commit is contained in:
Dhanya Maliakal 2017-09-29 16:43:23 +02:00
parent e0d82ad92d
commit d0b379a2d5

View File

@ -387,7 +387,7 @@ public:
* @param size size of image * @param size size of image
* @returns length of data received * @returns length of data received
*/ */
int ReceiveData(const int index, int* buf, const int size) int ReceiveData(const int index, char* buf, const int size)
{ {
zmq_msg_t message; zmq_msg_t message;
zmq_msg_init (&message); zmq_msg_init (&message);
@ -398,13 +398,13 @@ public:
#ifdef VERBOSE #ifdef VERBOSE
cprintf(BLUE,"%d actual data\n", index); cprintf(BLUE,"%d actual data\n", index);
#endif #endif
memcpy((char*)buf, (char*)zmq_msg_data(&message), size); memcpy(buf, (char*)zmq_msg_data(&message), size);
} }
//incorrect size //incorrect size
else { else {
cprintf(RED,"Error: Received weird packet size %d for socket %d\n", length, index); cprintf(RED,"Error: Received weird packet size %d for socket %d\n", length, index);
memset((char*)buf,0xFF,size); memset(buf,0xFF,size);
} }
zmq_msg_close(&message); zmq_msg_close(&message);