| 16 | "250 DSN\r\n"; |
| 17 | |
| 18 | int readreply (struct clientparam* param) { |
| 19 | unsigned char * buf; |
| 20 | int res, i, bufsize = 640; |
| 21 | |
| 22 | if(!(buf = myalloc(bufsize))) return 0; |
| 23 | do { |
| 24 | i = sockgetlinebuf(param, SERVER, buf, bufsize-1, '\n', conf.timeouts[STRING_L]); |
| 25 | if(i < 1) break; |
| 26 | #ifndef WITHMAIN |
| 27 | res = handlehdrfilterssrv(param, &buf, &bufsize, 0, &i); |
| 28 | if(res != PASS) { |
| 29 | myfree(buf); |
| 30 | return -1; |
| 31 | } |
| 32 | #endif |
| 33 | socksend(param->clisock, buf, i, conf.timeouts[STRING_S]); |
| 34 | } while (i > 3 && buf[3] == '-'); |
| 35 | if(i < 3) { |
| 36 | myfree(buf); |
| 37 | return 0; |
| 38 | } |
| 39 | buf[i] = 0; |
| 40 | res = atoi((char *)buf); |
| 41 | myfree(buf); |
| 42 | return res; |
| 43 | } |
| 44 | |
| 45 | int readcommand (struct clientparam* param) { |
| 46 | unsigned char * buf; |
no test coverage detected