Show
Ignore:
Timestamp:
05/17/07 16:58:46 (18 months ago)
Author:
krobillard
Message:

Thune - bzip2 & net config options build in thread_safe branch.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/thune/thread_safe/net.c

    r378 r389  
    115115 
    116116        if( ! _makeAddrName( (struct sockaddr_in*) addr->ptr.v, 
    117                              ur_cstring(hc), ur_int(tos) ) )  
     117                             ur_cstring(ut,hc), ur_int(tos) ) )  
    118118        { 
    119119            ur_throwErr( UR_ERR_SCRIPT, "gethostbyname failed" ); 
     
    128128 
    129129 
    130 static int _openUdpSocket( UThread* ur_thread, int port, int block ) 
     130static int _openUdpSocket( UThread* ut, int port, int block ) 
    131131{ 
    132132    struct sockaddr_in my_addr; 
     
    180180    -1  Url handled, but error occured. 
    181181*/ 
    182 static int _netOpen( UPortDevice* dev, UThread* ur_thread, UCell* tos ) 
     182static int _netOpen( UPortDevice* dev, UThread* ut, UCell* tos ) 
    183183{ 
    184184    int port; 
     
    196196    if( ! ur_isAWord(res) ) 
    197197        return 0; 
    198     if( ur_atom(res) != UR_INTERN("udp", 3) ) 
     198    if( ur_atom(res) != ur_intern("udp", 3) ) 
    199199        return 0; 
    200200 
     
    232232        } 
    233233 
    234         if( ! _makeAddrName( &addr, ur_cstring(spec), hostPort ) ) 
     234        if( ! _makeAddrName( &addr, ur_cstring(ut,spec), hostPort ) ) 
    235235        { 
    236236            ur_throwErr( UR_ERR_ACCESS, "gethostbyname failed" ); 
     
    244244        int block = 1; 
    245245 
    246         if( ! ur_userAllows( ur_thread, "Open socket on port %d", port ) ) 
     246        if( ! ur_userAllows( ut, "Open socket on port %d", port ) ) 
    247247        { 
    248248            ur_throwErr( UR_ERR_ACCESS, "User denied open" ); 
     
    250250        } 
    251251 
    252         socket = _openUdpSocket( ur_thread, port, block ); 
     252        socket = _openUdpSocket( ut, port, block ); 
    253253        if( socket < 0 ) 
    254254            return -1; 
    255255 
    256         val = ur_makePort( dev, res );  
     256        val = ur_makePort( ut, dev, res );  
    257257        if( val ) 
    258258        { 
     
    390390    if( ur_is(val, UT_INT) ) 
    391391    { 
    392         if( ! ur_stringSlice( tos, &buf, &end ) ) 
     392        if( ! ur_stringSlice( ut, tos, &buf, &end ) ) 
    393393        { 
    394394            buf = 0; 
    395             ur_binarySlice( tos, &buf, &end ); 
     395            ur_binarySlice( ut, tos, &buf, &end ); 
    396396        } 
    397397