Commit 4882c95c20eb516ab92bbbd15d9c681ddb465ea7

Authored by Georg Hopp
1 parent 1da735ab

now clientConsumeLine removes the found line

... ... @@ -126,7 +126,7 @@ _clientGetLineDelimiter(tClient * client, const char * delim, unsigned int len)
126 126 /*
127 127 * this returns a newly allocate buffer, with the found line
128 128 * copied to it.
129   - * The calles has to take care to free this buffer again,
  129 + * The caller has to take care to free this buffer again,
130 130 * after he uses it.
131 131 */
132 132 char *
... ... @@ -137,6 +137,7 @@ clientConsumeLine(tClient * client, const char * delim, unsigned int * len)
137 137
138 138 if (NULL != found) {
139 139 line = calloc(*len +1, sizeof(char));
  140 + clientRemoveLine(client, delim, len);
140 141 memcpy(line, found, *len);
141 142 }
142 143
... ...
Please register or login to post a comment