Changeset 389
- Timestamp:
- 05/17/07 16:58:46 (17 months ago)
- Location:
- branches/thune/thread_safe
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/thune/thread_safe/config.t
r387 r389 1 1 ; Thune Configuration 2 2 3 [ ] bzip2 "Include bzip2 compress/decompress calls"4 [ ] trig "Include trigonometric math calls"5 [ ] math3d "Include vector & matrix math calls"3 [x] bzip2 "Include bzip2 compress/decompress calls" 4 [x] trig "Include trigonometric math calls" 5 [x] math3d "Include vector & matrix math calls" 6 6 enable trig 7 7 [ ] dt-code "Include 'code datatype" 8 8 9 [ ] net "UDP socket port"9 [x] net "UDP socket port" 10 10 11 11 [ ] uds "Library with datatype & gc system only - no eval" -
branches/thune/thread_safe/files.c
r387 r389 622 622 unsigned int blen; 623 623 624 if( ur_stringSlice( tos, &cpA, &cpB ) && cpA )624 if( ur_stringSlice( ut, tos, &cpA, &cpB ) && cpA ) 625 625 { 626 626 len = cpB - cpA; … … 663 663 664 664 665 if( ! ur_binarySlice( tos, &cpA, &cpB ) || (cpA == 0) )665 if( ! ur_binarySlice( ut, tos, &cpA, &cpB ) || (cpA == 0) ) 666 666 return; 667 667 -
branches/thune/thread_safe/net.c
r378 r389 115 115 116 116 if( ! _makeAddrName( (struct sockaddr_in*) addr->ptr.v, 117 ur_cstring( hc), ur_int(tos) ) )117 ur_cstring(ut,hc), ur_int(tos) ) ) 118 118 { 119 119 ur_throwErr( UR_ERR_SCRIPT, "gethostbyname failed" ); … … 128 128 129 129 130 static int _openUdpSocket( UThread* u r_thread, int port, int block )130 static int _openUdpSocket( UThread* ut, int port, int block ) 131 131 { 132 132 struct sockaddr_in my_addr; … … 180 180 -1 Url handled, but error occured. 181 181 */ 182 static int _netOpen( UPortDevice* dev, UThread* u r_thread, UCell* tos )182 static int _netOpen( UPortDevice* dev, UThread* ut, UCell* tos ) 183 183 { 184 184 int port; … … 196 196 if( ! ur_isAWord(res) ) 197 197 return 0; 198 if( ur_atom(res) != UR_INTERN("udp", 3) )198 if( ur_atom(res) != ur_intern("udp", 3) ) 199 199 return 0; 200 200 … … 232 232 } 233 233 234 if( ! _makeAddrName( &addr, ur_cstring( spec), hostPort ) )234 if( ! _makeAddrName( &addr, ur_cstring(ut,spec), hostPort ) ) 235 235 { 236 236 ur_throwErr( UR_ERR_ACCESS, "gethostbyname failed" ); … … 244 244 int block = 1; 245 245 246 if( ! ur_userAllows( u r_thread, "Open socket on port %d", port ) )246 if( ! ur_userAllows( ut, "Open socket on port %d", port ) ) 247 247 { 248 248 ur_throwErr( UR_ERR_ACCESS, "User denied open" ); … … 250 250 } 251 251 252 socket = _openUdpSocket( u r_thread, port, block );252 socket = _openUdpSocket( ut, port, block ); 253 253 if( socket < 0 ) 254 254 return -1; 255 255 256 val = ur_makePort( dev, res );256 val = ur_makePort( ut, dev, res ); 257 257 if( val ) 258 258 { … … 390 390 if( ur_is(val, UT_INT) ) 391 391 { 392 if( ! ur_stringSlice( tos, &buf, &end ) )392 if( ! ur_stringSlice( ut, tos, &buf, &end ) ) 393 393 { 394 394 buf = 0; 395 ur_binarySlice( tos, &buf, &end );395 ur_binarySlice( ut, tos, &buf, &end ); 396 396 } 397 397
