Changeset 3364 for pjproject/trunk
- Timestamp:
- Nov 12, 2010 7:42:58 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/ssl_sock_symbian.cpp
r3117 r3364 1021 1021 return; 1022 1022 } 1023 } else { 1024 /* Buffer empty, reset the start position */ 1025 st->start = st->buf; 1023 1026 } 1024 1027 } … … 1059 1062 */ 1060 1063 1061 pj_size_t avail_len = st->max_len - st->len;1062 1064 pj_size_t needed_len = *size + sizeof(write_data_t) - 1; 1063 1065 … … 1065 1067 needed_len = ((needed_len + 3) >> 2) << 2; 1066 1068 1067 /* Block until there is buffer slot available ! */1068 while ( needed_len >= avail_len) {1069 /* Block until there is buffer slot available and contiguous! */ 1070 while (st->start + st->len + needed_len > st->buf + st->max_len) { 1069 1071 pj_symbianos_poll(-1, -1); 1070 avail_len = st->max_len - st->len; 1071 } 1072 1073 /* Ok, make sure the new data will not get wrapped */ 1074 if (st->start + st->len + needed_len > st->buf + st->max_len) { 1075 /* Align buffer left */ 1076 pj_memmove(st->buf, st->start, st->len); 1077 st->start = st->buf; 1078 } 1079 1072 } 1073 1080 1074 /* Push back the send data into the buffer */ 1081 1075 write_data_t *wdata = (write_data_t*)(st->start + st->len);
Note: See TracChangeset
for help on using the changeset viewer.