• Home
  • Raw
  • Download

Lines Matching refs:len

36     int len;  in sendfailmsg()  local
37 len = strlen(reason); in sendfailmsg()
38 if(len > 0xffff) len = 0xffff; in sendfailmsg()
39 snprintf(buf, sizeof buf, "FAIL%04x", len); in sendfailmsg()
41 return writex(fd, reason, len); in sendfailmsg()
132 D("LS(%d): enqueue %d\n", s->id, p->len); in local_socket_enqueue()
147 while(p->len > 0) { in local_socket_enqueue()
148 int r = adb_write(s->fd, p->ptr, p->len); in local_socket_enqueue()
150 p->len -= r; in local_socket_enqueue()
163 if(p->len == 0) { in local_socket_enqueue()
211 D("LS(%d): discarding %d bytes\n", s->id, p->len); in local_socket_destroy()
269 while(p->len > 0) { in local_socket_event_func()
270 int r = adb_write(fd, p->ptr, p->len); in local_socket_event_func()
273 p->len -= r; in local_socket_event_func()
288 if(p->len == 0) { in local_socket_event_func()
342 p->len = MAX_PAYLOAD - avail; in local_socket_event_func()
431 p->msg.data_length = p->len; in remote_socket_enqueue()
504 int len = strlen(destination) + 1; in connect_to_remote() local
506 if(len > (MAX_PAYLOAD-1)) { in connect_to_remote()
513 p->msg.data_length = len; in connect_to_remote()
540 unsigned unhex(unsigned char *s, int len) in unhex() argument
544 while(len-- > 0) { in unhex()
598 unsigned len; in smart_socket_enqueue() local
600 D("SS(%d): enqueue %d\n", s->id, p->len); in smart_socket_enqueue()
606 if((s->pkt_first->len + p->len) > MAX_PAYLOAD) { in smart_socket_enqueue()
612 memcpy(s->pkt_first->data + s->pkt_first->len, in smart_socket_enqueue()
613 p->data, p->len); in smart_socket_enqueue()
614 s->pkt_first->len += p->len; in smart_socket_enqueue()
621 if(p->len < 4) return 0; in smart_socket_enqueue()
623 len = unhex(p->data, 4); in smart_socket_enqueue()
624 if((len < 1) || (len > 1024)) { in smart_socket_enqueue()
625 D("SS(%d): bad size (%d)\n", s->id, len); in smart_socket_enqueue()
629 D("SS(%d): len is %d\n", s->id, len ); in smart_socket_enqueue()
631 if((len + 4) > p->len) { in smart_socket_enqueue()
632 D("SS(%d): waiting for %d more bytes\n", s->id, len+4 - p->len); in smart_socket_enqueue()
636 p->data[len + 4] = 0; in smart_socket_enqueue()