| 91 | }; |
| 92 | |
| 93 | static void addbuffer(int increment, struct clientparam * param, unsigned char ** buf_p, int * bufsize_p, int * length_p){ |
| 94 | int bufsize = *length_p + increment + 40; |
| 95 | unsigned char *newbuf; |
| 96 | int len = 0; |
| 97 | |
| 98 | |
| 99 | if(bufsize > *bufsize_p){ |
| 100 | newbuf = myalloc(bufsize); |
| 101 | if(!newbuf) return; |
| 102 | memcpy(newbuf, *buf_p, *length_p); |
| 103 | myfree(*buf_p); |
| 104 | *buf_p = newbuf; |
| 105 | *bufsize_p = bufsize; |
| 106 | } |
| 107 | if(increment) len = sockrecvfrom(param->remsock, (struct sockaddr *)¶m->sinsr, *buf_p + *length_p, increment, conf.timeouts[STRING_S]*1000); |
| 108 | if(len > 0) { |
| 109 | *length_p += len; |
| 110 | param->nreads++; |
| 111 | param->statssrv64 += len; |
| 112 | } |
| 113 | return; |
| 114 | } |
| 115 | |
| 116 | |
| 117 |
no test coverage detected