scmirroring_debug("client %p: connection closed", client);
/* Sends coupled sink address to scmirroring_src */
- if(server_obj->coupling_mode == 1){
- gchar * msg = g_malloc(sizeof(char *) * 50);
- g_sprintf(msg, "MESSAGE:COUPLED_SINK_ADDRESS:%s", gst_rtsp_connection_get_ip(connection));
- klass->send_response(server_obj,msg);
+ if (server_obj->coupling_mode == TRUE) {
+ gchar *msg = g_strdup_printf("MESSAGE:COUPLED_SINK_ADDRESS:%s", gst_rtsp_connection_get_ip(connection));
+ klass->send_response(server_obj, msg);
g_free(msg);
usleep(250000);
}