Lines Matching refs:ss

58 	sdp_session_p			 ss = (sdp_session_p) xss;  in sdp_search()  local
63 if (ss == NULL) in sdp_search()
66 if (ss->req == NULL || ss->rsp == NULL || in sdp_search()
68 ss->error = EINVAL; in sdp_search()
72 req = ss->req; in sdp_search()
83 ss->error = EINVAL; in sdp_search()
102 if (ss->req_e - req < len) { in sdp_search()
103 ss->error = ENOBUFS; in sdp_search()
139 ss->cslen = 0; in sdp_search()
140 rsp = ss->rsp; in sdp_search()
147 if (ss->req_e - req_cs < ss->cslen + 1) { in sdp_search()
148 ss->error = ENOBUFS; in sdp_search()
152 SDP_PUT8(ss->cslen, req_cs); in sdp_search()
153 if (ss->cslen > 0) { in sdp_search()
154 memcpy(req_cs, ss->cs, ss->cslen); in sdp_search()
155 req_cs += ss->cslen; in sdp_search()
160 xpdu.pdu.tid = htons(ss->tid); in sdp_search()
161 xpdu.pdu.len = htons(req_cs - ss->req); in sdp_search()
166 iov[1].iov_base = (void *) ss->req; in sdp_search()
167 iov[1].iov_len = req_cs - ss->req; in sdp_search()
170 len = writev(ss->s, iov, sizeof(iov)/sizeof(iov[0])); in sdp_search()
174 ss->error = errno; in sdp_search()
182 iov[1].iov_len = ss->imtu; in sdp_search()
185 len = readv(ss->s, iov, sizeof(iov)/sizeof(iov[0])); in sdp_search()
189 ss->error = errno; in sdp_search()
193 ss->error = ENOMSG; in sdp_search()
202 xpdu.pdu.tid != ss->tid || in sdp_search()
205 ss->error = EIO; in sdp_search()
210 ss->tid ++; in sdp_search()
213 ss->cslen = rsp[0]; in sdp_search()
214 if (ss->cslen > 0) { in sdp_search()
215 if (ss->cslen > sizeof(ss->cs)) { in sdp_search()
216 ss->error = ENOBUFS; in sdp_search()
220 memcpy(ss->cs, rsp + 1, ss->cslen); in sdp_search()
227 if (ss->rsp_e - rsp <= ss->imtu) { in sdp_search()
230 size = ss->rsp_e - ss->rsp + ss->imtu; in sdp_search()
231 offset = rsp - ss->rsp; in sdp_search()
233 rsp_tmp = realloc(ss->rsp, size); in sdp_search()
235 ss->error = ENOMEM; in sdp_search()
239 ss->rsp = rsp_tmp; in sdp_search()
240 ss->rsp_e = ss->rsp + size; in sdp_search()
241 rsp = ss->rsp + offset; in sdp_search()
244 } while (ss->cslen > 0); in sdp_search()
274 rsp_tmp = ss->rsp; in sdp_search()
292 ss->error = ENOATTR; in sdp_search()
314 ss->error = ENOATTR; in sdp_search()
324 ss->error = ENOATTR; in sdp_search()
392 ss->error = ENOATTR; in sdp_search()
419 ss->error = 0; in sdp_search()