Commit Graph

12 Commits

Author SHA1 Message Date
Srivats P
1bc2d08fdb Reset RPC input stream after aborting the connection
Without reset, on reconnection, the input stream reads the buffered
data before abort.
2020-05-12 21:56:40 +05:30
Srivats P
75ce626532 Convert RPC channel's static vars to data members
Using static vars meant all connections were using the same static vars!
A bug that has existed since 2009!

This code is ugly, but since it is such a fundamental piece of code for
every operation, no refactoring is being done except to convert the
static vars to data members renaming where required to avoid name
conflicts. The one exception is that `cumLen` which was a per hdr.type
variable is now a single data member across all types. Since for a
single connection messages will be sequential this is expected to work
(fingers crossed!)

For the future we should look at replacing the custom RPC code with GRPC
(issue #305).

Fixes #304
2020-05-12 21:33:54 +05:30
Srivats P
dccf2042f0 Abort connection if bad data received from drone
Currently we would crash because of qFatal(). The new behaviour is
better. Error is reported in the logs window alongwith a suggestion on
what to check.
2020-05-09 09:50:32 +05:30
Srivats P
e75ed87dd7 RPC channel now prints method names in addition to id for better debugging 2016-04-26 18:33:20 +05:30
Srivats P
133a83f139 Bugfix: Ostinato GUI crash when response from Drone is split into multiple frames - the message is parsed incompletely and subsequent frame which starts in the middle of the previous message is interpreted as start of new message leading to the crash. With this fix we are effectively not able to use zero copy as originally intended. To use zero-copy we need to make a blocking call which means we need to do this in a new thread. Till that time this fix will avoid the crash and do the correct thing. 2016-01-04 20:30:05 +05:30
Srivats P
efdfa7f95d Feature: Ostinato client now accepts hostnames for drones and does DNS resolution for the same; IPv6 addresses are also accepted. Introduced Drone setting to listen to specific or 'any' IPv4 (or IPv6) address
Fixes #152
2015-11-06 18:57:07 +05:30
Srivats P.
53b0154e79 Bugfix (collateral): Fixed msg parsing logic for blob/error which causes GUI to crash or become unresponsive; this was a colleteral of reworking of the msg parsing code to fix day one issues in revision c484106d19b8
Fixes issue 153
2015-06-14 18:02:22 +05:30
Srivats P.
d677b09491 Fixed gcc4 warnings 2015-06-05 20:18:41 +05:30
Srivats P.
f1378965ca Bugfix: Fixed bugs in RPC Channel read function that causes the client to miss some messages or not receive any at all (see the diff for details); these bugs are day one bugs but adding the Notify RPC increased the chances of seeing them
Updates issue 144
2015-05-01 13:20:12 +05:30
Srivats P.
9be69a8f46 Refactoring: Cleanup RPC Channel's knowledge of notification prototype
Updates issue 144
2015-04-25 20:12:37 +05:30
Srivats P.
ad6baea4af Infra: On a port modify, all clients are sent notifications of the same - they can request for port config again to get latest config
Updates issue 144
2015-04-24 20:53:00 +05:30
Srivats P.
a9da643fb2 Feature: Reserve Ports for cooperative use of shared drone. If a port is reserved the GUI will display the username of the owner but others can still view and control the port; in other words, we just potentially prevent unintentional usage of other people's ports, users still need to play nice with each other!
Fixes issue 144
2015-04-16 22:20:07 +05:30