summaryrefslogtreecommitdiff
path: root/kiss_mode.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2024-07-23 21:26:34 +0100
committerDave Hibberd <hibby@debian.org>2024-07-23 21:26:34 +0100
commit4172fa5fdbda80c64e25cb97f27c5b7b4cfee1ea (patch)
treeb6c2ffb8ae1248ab0e4b0fb9f1bc26119586b1c0 /kiss_mode.c
parente67baf26b150eb848909ebb9f4e13bf6bed3bd0d (diff)
parentb1d1488de60dfff8b89872f863098a884133852f (diff)
Update upstream source from tag 'upstream/0.0.0.72.1'
Update to upstream version '0.0.0.72.1' with Debian dir 3be9dd1ec6203d09272f9d129187c43762eebbe7
Diffstat (limited to 'kiss_mode.c')
-rw-r--r--kiss_mode.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/kiss_mode.c b/kiss_mode.c
index 72688a7..56feb2a 100644
--- a/kiss_mode.c
+++ b/kiss_mode.c
@@ -22,20 +22,6 @@ along with QtSoundModem. If not, see http://www.gnu.org/licenses
#include "UZ7HOStuff.h"
-/*
-uses sysutils,classes;
-
- procedure KISS_init;
- procedure KISS_free;
- procedure KISS_add_stream(socket: integer);
- procedure KISS_del_stream(socket: integer);
- procedure KISS_on_data_in(socket: integer; data: string);
- procedure KISS_on_data_out(port: byte; frame: string);
- procedure KISS_send_ack(port: byte; data: string);
- procedure KISS_send_ack1(port: byte);
-*/
-// I don't like this. maybe fine for Dephi but overcomlicated for C
-
// I think I need a struct for each connection, but a simple array of entries should be fine
// My normal ** and count system
// Each needs an input buffer of max size kiss frame and length (or maybe string is a good idea)
@@ -89,13 +75,14 @@ end;
void KISS_add_stream(void * Socket)
{
- // Add a new connection. Called when QT accepts an incoming call}
+ // Add a new connection. Called wheKISSn QT accepts an incoming call}
TKISSMode * KISS;
KissConnections = realloc(KissConnections, (KISSConCount + 1) * sizeof(void *));
- KISS = KissConnections[KISSConCount++] = malloc(sizeof(KISS));
+ KISS = KissConnections[KISSConCount++] = malloc(sizeof(*KISS));
+ memset(KISS, 0, sizeof(*KISS));
KISS->Socket = Socket;
KISS->data_in = newString();