adding state to socket functions

This commit is contained in:
Vladimir Dubrovin committed 2024-02-17 17:31:25 +03:00
1 parent d83c1f47f8
commit 8198db8617
18 files changed
+462 -360

No files matched your search

+2 -2
View File
@@ -55,12 +55,12 @@ char * aceaction (int action){
static void stdpr(struct printparam* pp, char *buf, int inbuf){
if((pp->inbuf + inbuf > 1024) || !buf) {
socksend(pp->cp->clisock, (unsigned char *)pp->buf, pp->inbuf, conf.timeouts[STRING_S]);
socksend(pp->cp, pp->cp->clisock, (unsigned char *)pp->buf, pp->inbuf, conf.timeouts[STRING_S]);
pp->inbuf = 0;
if(!buf) return;
}
if(inbuf >= 1000){
socksend(pp->cp->clisock, (unsigned char *)buf, inbuf, conf.timeouts[STRING_S]);
socksend(pp->cp, pp->cp->clisock, (unsigned char *)buf, inbuf, conf.timeouts[STRING_S]);
}
else {
memcpy(pp->buf + pp->inbuf, buf, inbuf);