Rev 4723 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4723 | Rev 4743 | ||
|---|---|---|---|
| Line 326... | Line 326... | ||
| 326 | free( device ); |
326 | free( device ); |
| 327 | return index; |
327 | return index; |
| 328 | } |
328 | } |
| 329 | device->service = service; |
329 | device->service = service; |
| 330 | // bind the new one |
330 | // bind the new one |
| 331 | device->phone = bind_service( device->service, ( ipcarg_t ) device->device_id, SERVICE_ARP, 0, arp_globals.client_connection ); |
331 | device->phone = nil_bind_service( device->service, ( ipcarg_t ) device->device_id, SERVICE_ARP, arp_globals.client_connection ); |
| 332 | if( device->phone < 0 ){ |
332 | if( device->phone < 0 ){ |
| 333 | fibril_rwlock_write_unlock( & arp_globals.lock ); |
333 | fibril_rwlock_write_unlock( & arp_globals.lock ); |
| 334 | arp_protos_destroy( & device->protos ); |
334 | arp_protos_destroy( & device->protos ); |
| 335 | free( device ); |
335 | free( device ); |
| 336 | return EREFUSED; |
336 | return EREFUSED; |
| Line 341... | Line 341... | ||
| 341 | arp_protos_destroy( & device->protos ); |
341 | arp_protos_destroy( & device->protos ); |
| 342 | free( device ); |
342 | free( device ); |
| 343 | return ERROR_CODE; |
343 | return ERROR_CODE; |
| 344 | } |
344 | } |
| 345 | // get hardware address |
345 | // get hardware address |
| 346 | if( ERROR_OCCURRED( nil_get_addr( device->phone, device_id, & device->addr, & device->addr_data ))){ |
346 | if( ERROR_OCCURRED( nil_get_addr_req( device->phone, device_id, & device->addr, & device->addr_data ))){ |
| 347 | fibril_rwlock_write_unlock( & arp_globals.lock ); |
347 | fibril_rwlock_write_unlock( & arp_globals.lock ); |
| 348 | arp_protos_destroy( & device->protos ); |
348 | arp_protos_destroy( & device->protos ); |
| 349 | free( device ); |
349 | free( device ); |
| 350 | return ERROR_CODE; |
350 | return ERROR_CODE; |
| 351 | } |
351 | } |
| 352 | // get broadcast address |
352 | // get broadcast address |
| 353 | if( ERROR_OCCURRED( nil_get_broadcast_addr( device->phone, device_id, & device->broadcast_addr, & device->broadcast_data ))){ |
353 | if( ERROR_OCCURRED( nil_get_broadcast_addr_req( device->phone, device_id, & device->broadcast_addr, & device->broadcast_data ))){ |
| 354 | fibril_rwlock_write_unlock( & arp_globals.lock ); |
354 | fibril_rwlock_write_unlock( & arp_globals.lock ); |
| 355 | free( device->addr ); |
355 | free( device->addr ); |
| 356 | free( device->addr_data ); |
356 | free( device->addr_data ); |
| 357 | arp_protos_destroy( & device->protos ); |
357 | arp_protos_destroy( & device->protos ); |
| 358 | free( device ); |
358 | free( device ); |