Browse Source

now clientConsumeLine removes the found line

master
Georg Hopp 15 years ago
parent
commit
4882c95c20
  1. 3
      reader/commonReader/clientRead.c

3
reader/commonReader/clientRead.c

@ -126,7 +126,7 @@ _clientGetLineDelimiter(tClient * client, const char * delim, unsigned int len)
/*
* this returns a newly allocate buffer, with the found line
* copied to it.
* The calles has to take care to free this buffer again,
* The caller has to take care to free this buffer again,
* after he uses it.
*/
char *
@ -137,6 +137,7 @@ clientConsumeLine(tClient * client, const char * delim, unsigned int * len)
if (NULL != found) {
line = calloc(*len +1, sizeof(char));
clientRemoveLine(client, delim, len);
memcpy(line, found, *len);
}

Loading…
Cancel
Save