ucspi-ssl  0.99e
TLS encryption for IPv6 communication
getln.c
Go to the documentation of this file.
1 #include "byte.h"
2 #include "getln.h"
3 
4 int getln(buffer *ss,stralloc *sa,int *match,int sep)
5 {
6  char *cont;
7  unsigned int clen;
8 
9  if (getln2(ss,sa,&cont,&clen,sep) == -1) return -1;
10  if (!clen) { *match = 0; return 0; }
11  if (!stralloc_catb(sa,cont,clen)) return -1;
12  *match = 1;
13  return 0;
14 }
int getln(buffer *ss, stralloc *sa, int *match, int sep)
Definition: getln.c:4
int match
Definition: sslclient.c:116
int getln2(buffer *, stralloc *, char **, unsigned int *, int)
Definition: getln2.c:4
Definition: buffer.h:6
int stralloc_catb(stralloc *, const char *, unsigned int)
Definition: stralloc_catb.c:6