Changeset 148 for uKadecot/trunk/uip
- Timestamp:
- Jan 8, 2016, 2:35:52 PM (8 years ago)
- Location:
- uKadecot/trunk/uip
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uKadecot/trunk/uip/apps/webserver/websocket.c
r108 r148 127 127 // Payload buffer 128 128 default: 129 _ecn_fbs_poke(ws->cur_in_msg, s->data_pos, *pos ^ s->masking_key[s->data_pos % 4]); 129 if(ws->cur_in_msg.ptr != NULL) 130 _ecn_fbs_poke(ws->cur_in_msg, s->data_pos, *pos ^ s->masking_key[s->data_pos % 4]); 130 131 131 132 s->data_pos++; … … 133 134 ER ret; 134 135 s->state = 0; 135 ((ID *)ws->cur_in_msg.ptr->_gap)[0] = ws->wbsid; 136 ret = psnd_dtq(ecn_api_mailboxid, (intptr_t)ws->cur_in_msg.ptr); 137 if (ret != E_OK) { 138 syslog(LOG_WARNING, "websocket_input() : psnd_dtq(%d) result = %d", ecn_api_mailboxid, ret); 139 _ecn_fbs_del(ws->cur_in_msg); 136 137 if (ws->cur_in_msg.ptr != NULL) { 138 ((ID *)ws->cur_in_msg.ptr->_gap)[0] = ws->wbsid; 139 ret = psnd_dtq(ecn_api_mailboxid, (intptr_t)ws->cur_in_msg.ptr); 140 if (ret != E_OK) { 141 syslog(LOG_WARNING, "websocket_input() : psnd_dtq(%d) result = %d", ecn_api_mailboxid, ret); 142 _ecn_fbs_del(ws->cur_in_msg); 143 } 140 144 } 141 145 memset(&ws->cur_in_msg, 0, sizeof(ws->cur_in_msg)); -
uKadecot/trunk/uip/target/if_rx62n/if_rx62n.c
r108 r148 378 378 */ 379 379 380 void 380 bool_t 381 381 rx62n_start (T_IF_SOFTC *ic, void *output, int size) 382 382 { … … 391 391 392 392 if (desc->tact != 0) { 393 break;393 return false; 394 394 } 395 395 … … 423 423 sil_wrw_mem(EDMAC_EDTRR, EDMAC_EDTRR_TR); 424 424 } 425 426 return true; 425 427 } 426 428 … … 435 437 T_RX62N_SOFTC *sc; 436 438 uint32_t ecsr, eesr, psr; 437 bool_t acttsk ;439 bool_t acttsk = false; 438 440 439 441 i_begin_int(INTNO_IF_RX62N_TRX); -
uKadecot/trunk/uip/target/if_rx62n/if_rx62n.h
r108 r148 60 60 */ 61 61 62 #define NUM_IF_RX62N_TXBUF 8/* 送信バッファ数 */62 #define NUM_IF_RX62N_TXBUF 2 /* 送信バッファ数 */ 63 63 #define NUM_IF_RX62N_RXBUF 8 /* 受信バッファ数 */ 64 64 #define IF_RX62N_BUF_PAGE_SIZE 1518 /* バッファサイズ */ … … 120 120 extern bool_t rx62n_link(T_IF_SOFTC *ic); 121 121 extern int rx62n_read(T_IF_SOFTC *ic, void **input); 122 extern voidrx62n_start(T_IF_SOFTC *ic, void *output, int size);122 extern bool_t rx62n_start(T_IF_SOFTC *ic, void *output, int size); 123 123 extern ER rx62n_addmulti(T_IF_SOFTC *ic); 124 124 extern void if_rx62n_trx_handler(void); -
uKadecot/trunk/uip/task/uip_task.c
r125 r148 98 98 T_IF_SOFTC *ic = IF_ETHER_NIC_GET_SOFTC(); 99 99 int ret; 100 bool_t tx; 100 101 101 102 PT_BEGIN(&uiptsk->pt); … … 124 125 125 126 PT_WAIT_UNTIL(&uiptsk->pt, (ret = ic->link_pre != ic->link_now ? 1 : 126 (ic->rxb_read != ic->rxb_write ? 2 :127 127 (uip_out_buf[uip_out_rpos].len > 0 ? 3 : 128 128 (ws_out_req != ws_out_res ? 4 : 129 (timer_expired(&uiptsk->periodic_timer) ? 5 : 0))))) != 0); 129 (timer_expired(&uiptsk->periodic_timer) ? 5 : 130 (ic->rxb_read != ic->rxb_write ? 2 : 0))))) != 0); 130 131 131 132 if(ret == 1){ … … 146 147 if (uip_len > 0) { 147 148 uip_arp_out(); 148 IF_ETHER_NIC_START(ic, uip_buf, uip_len); 149 for (;;) { 150 tx = IF_ETHER_NIC_START(ic, uip_buf, uip_len); 151 if (tx) 152 break; 153 PT_YIELD(&uiptsk->pt); 154 } 149 155 } 150 156 } … … 174 180 if (uip_len > 0) { 175 181 uip_arp_out(); 176 IF_ETHER_NIC_START(ic, uip_buf, uip_len); 182 for (;;) { 183 tx = IF_ETHER_NIC_START(ic, uip_buf, uip_len); 184 if (tx) 185 break; 186 PT_YIELD(&uiptsk->pt); 187 } 177 188 PT_YIELD(&uiptsk->pt); 178 189 continue; … … 185 196 uip_len is set to a value > 0. */ 186 197 if (uip_len > 0) { 187 IF_ETHER_NIC_START(ic, uip_buf, uip_len); 198 for (;;) { 199 tx = IF_ETHER_NIC_START(ic, uip_buf, uip_len); 200 if (tx) 201 break; 202 PT_YIELD(&uiptsk->pt); 203 } 188 204 PT_YIELD(&uiptsk->pt); 189 205 continue; … … 204 220 uip_udp_send(buf->len); 205 221 206 buf->len = 0;207 uip_out_rpos++;208 if (uip_out_rpos >= UIP_BUF_COUNT)209 uip_out_rpos = 0;210 211 222 uip_udp_conn = cepid; 212 223 uip_process(UIP_UDP_SEND_CONN); … … 214 225 cepid->rport = 0; 215 226 uip_arp_out(); 216 IF_ETHER_NIC_START(ic, uip_buf, uip_len); 227 for (;;) { 228 tx = IF_ETHER_NIC_START(ic, uip_buf, uip_len); 229 if (tx) 230 break; 231 PT_YIELD(&uiptsk->pt); 232 } 233 234 buf = &uip_out_buf[uip_out_rpos]; 235 uip_out_rpos++; 236 if (uip_out_rpos >= UIP_BUF_COUNT) 237 uip_out_rpos = 0; 238 buf->len = 0; 239 217 240 PT_YIELD(&uiptsk->pt); 218 241 continue; … … 231 254 if (uip_len > 0) { 232 255 uip_arp_out(); 233 IF_ETHER_NIC_START(ic, uip_buf, uip_len); 256 for (;;) { 257 tx = IF_ETHER_NIC_START(ic, uip_buf, uip_len); 258 if (tx) 259 break; 260 PT_YIELD(&uiptsk->pt); 261 } 234 262 PT_YIELD(&uiptsk->pt); 235 263 } … … 247 275 if (uip_len > 0) { 248 276 uip_arp_out(); 249 IF_ETHER_NIC_START(ic, uip_buf, uip_len); 277 for (;;) { 278 tx = IF_ETHER_NIC_START(ic, uip_buf, uip_len); 279 if (tx) 280 break; 281 PT_YIELD(&uiptsk->pt); 282 } 250 283 PT_YIELD(&uiptsk->pt); 251 284 } … … 261 294 if (uip_len > 0) { 262 295 uip_arp_out(); 263 IF_ETHER_NIC_START(ic, uip_buf, uip_len); 296 for (;;) { 297 tx = IF_ETHER_NIC_START(ic, uip_buf, uip_len); 298 if (tx) 299 break; 300 PT_YIELD(&uiptsk->pt); 301 } 264 302 PT_YIELD(&uiptsk->pt); 265 303 }
Note:
See TracChangeset
for help on using the changeset viewer.