Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 3b1e1d8

Browse files
committed
Do not reset buffer with every call to the read callback.
1 parent 1de71ce commit 3b1e1d8

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/comms.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ signald_read_cb(gpointer data, gint source, PurpleInputCondition cond)
1818
// this function essentially just reads bytes into a buffer until a newline is reached
1919
// apparently, this callback is executed every 8k butes. therefore, input_buffer must be persistent accross calls
2020
// using getline would be cool, but I do not want to find out what happens if I wrap this fd into a FILE* while the purple handle is connected to it
21-
sa->input_buffer_position = sa->input_buffer;
2221
gssize read = recv(sa->fd, sa->input_buffer_position, 1, sa->readflags); // read one byte at a time
2322
while (read > 0) {
2423
sa->input_buffer_position += read;

0 commit comments

Comments
 (0)