Changeset 171

Show
Ignore:
Timestamp:
06/26/07 16:28:24 (17 months ago)
Author:
zany
Message:

return instead of exit

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/obexftp/bt_discovery.c

    r168 r171  
    4747  else 
    4848      dev_id = hci_get_route(NULL); 
    49   DEBUG(1, "%s: Scanning ...\n", __func__); 
     49  DEBUG(2, "%s: Scanning ...\n", __func__); 
    5050  flags = IREQ_CACHE_FLUSH; /* only show devices currently in range */ 
    5151  num_rsp = hci_inquiry(dev_id, length, num_rsp, NULL, &info, flags); 
     
    5454    { 
    5555      perror("Inquiry failed."); 
    56       exit(1); 
     56      return NULL; 
    5757    } 
    5858 
     
    6262      perror("HCI device open failed"); 
    6363      free(info); 
    64       exit(1); 
     64      return NULL; 
    6565    } 
    6666   
     
    7676        } 
    7777 
    78       DEBUG(1, "%s: Found\t%s\t%s\n", __func__, batostr(&bdswap), name); 
     78      DEBUG(2, "%s: Found\t%s\t%s\n", __func__, batostr(&bdswap), name); 
    7979      res[i] = strdup(batostr(&bdswap)); 
    8080  } 
     
    101101      perror("SDP service search"); 
    102102      sdp_close(sess); 
    103       exit(1); 
     103      return -1; 
    104104    } 
    105105 
     
    153153    { 
    154154      perror("Failed to connect to SDP server"); 
    155       exit(1); 
     155      return -1; 
    156156    } 
    157157//  baswap(&bdswap, &bdaddr); 
     
    188188#warning "no bluetooth scan available" 
    189189#include "client.h" 
    190 char **obexftp_discover_bt() 
     190char **obexftp_discover_bt_src(const char *UNUSED(src)) 
    191191{ 
    192192    return NULL; 
    193193} 
    194 int obexftp_browse_bt(const char *UNUSED(addr), int UNUSED(svclass)) 
    195 { 
    196     return 0; 
     194int obexftp_browse_bt_src(const char *UNUSED(src), const char *UNUSED(addr), int UNUSED(svclass)) 
     195{ 
     196    return -1; 
    197197} 
    198198 
     
    202202#warning "no bluetooth discovery available" 
    203203#include "client.h" 
    204 char **obexftp_discover_bt() 
     204char **obexftp_discover_bt_src(const char *src) 
    205205{ 
    206206    return NULL; 
    207207} 
    208 int obexftp_browse_bt(const char *UNUSED(addr), int UNUSED(svclass)) 
    209 { 
    210     return 0; 
     208int obexftp_browse_bt_src(const char *UNUSED(src), const char *UNUSED(addr), int UNUSED(svclass)) 
     209{ 
     210    return -1; 
    211211} 
    212212