|
|
|
@ -259,10 +259,11 @@ void ModbusSrv::ServerThread() {
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
char *txt = (char*)malloc(255);
|
|
|
|
|
snprintf (txt, 255, "error on processing message\n");
|
|
|
|
|
snprintf (txt, 255, "error on processing message, close connection\n");
|
|
|
|
|
gdk_threads_add_idle(cb_thread_network_text_add, txt);
|
|
|
|
|
delete clients[slot];
|
|
|
|
|
clients[slot] = NULL;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (mbindata->fc == 5 || mbindata->fc == 6) {
|
|
|
|
@ -273,7 +274,7 @@ void ModbusSrv::ServerThread() {
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
char *txt = (char*)malloc(255);
|
|
|
|
|
snprintf (txt, 255, "error on processing message\n");
|
|
|
|
|
snprintf (txt, 255, "error on processing message, close connection\n");
|
|
|
|
|
gdk_threads_add_idle(cb_thread_network_text_add, txt);
|
|
|
|
|
delete clients[slot];
|
|
|
|
|
clients[slot] = NULL;
|
|
|
|
@ -285,7 +286,7 @@ void ModbusSrv::ServerThread() {
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
char *txt = (char*)malloc(255);
|
|
|
|
|
snprintf (txt, 255, "error on processing message\n");
|
|
|
|
|
snprintf (txt, 255, "error on processing message, close connection\n");
|
|
|
|
|
gdk_threads_add_idle(cb_thread_network_text_add, txt);
|
|
|
|
|
delete clients[slot];
|
|
|
|
|
clients[slot] = NULL;
|
|
|
|
|