<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -78,6 +78,7 @@ static connection_t *connections;
 
 
 static char *tty = NULL; // &quot;/dev/ttyS0&quot;;
+static char *source = NULL; // &quot;00:11:22:33:44:55&quot;; &quot;hci0&quot;;
 static int search_irda = 1;
 static int search_bt = 1;
 static int search_usb = 1;
@@ -250,7 +251,7 @@ static obexftp_client_t *cli_open(int transport, char *addr, int channel)
         for (retry = 0; retry &lt; 3; retry++) {
 
                 /* Connect */
-                if (obexftp_connect (cli, addr, channel) &gt;= 0)
+                if (obexftp_connect_src (cli, source, addr, channel, UUID_FBS, sizeof(UUID_FBS)) &gt;= 0)
                         return cli;
                 /* Still trying to connect */
 		sleep(1);
@@ -805,13 +806,14 @@ int main(int argc, char *argv[])
 			{&quot;nobluetooth&quot;,	no_argument, NULL, 'B'},
 			{&quot;nousb&quot;,	no_argument, NULL, 'U'},
 			{&quot;tty&quot;,		required_argument, NULL, 't'},
+			{&quot;hci&quot;, required_argument, NULL, 'd'},
 			{&quot;nonblock&quot;,	no_argument, NULL, 'N'},
 			{&quot;help&quot;,	no_argument, NULL, 'h'},
 			{&quot;usage&quot;,	no_argument, NULL, 'h'},
 			{0, 0, 0, 0}
 		};
 		
-		c = getopt_long (argc, argv, &quot;+IBUt:Nh&quot;,
+		c = getopt_long (argc, argv, &quot;+IBUt:d:Nh&quot;,
 				 long_options, &amp;option_index);
 		if (c == -1)
 			break;
@@ -838,6 +840,10 @@ int main(int argc, char *argv[])
 			if (strcasecmp(optarg, &quot;irda&quot;))
 				tty = optarg;
 			break;
+
+		case 'd':
+			source = optarg;
+			break;
 			
 		case 'N':
 			nonblock = 1;
@@ -845,7 +851,7 @@ int main(int argc, char *argv[])
 
 		case 'h':
 			/* printf(&quot;ObexFS %s\n&quot;, VERSION); */
-			printf(&quot;Usage: %s [-I] [-B] [-U] [-t &lt;dev&gt;] [-N] [-- &lt;fuse options&gt;]\n&quot;
+			printf(&quot;Usage: %s [-I] [-B] [-U] [-t &lt;dev&gt;] [-d &lt;hci&gt;] [-N] [-- &lt;fuse options&gt;]\n&quot;
 				&quot;Transfer files from/to Mobile Equipment.\n&quot;
 				&quot;Copyright (c) 2002-2005 Christian W. Zuckschwerdt\n&quot;
 				&quot;\n&quot;
@@ -853,6 +859,7 @@ int main(int argc, char *argv[])
 				&quot; -B, --nobluetooth           dont search for bluetooth devices\n&quot;
 				&quot; -U, --nousb                 dont search for usb devices\n&quot;
 				&quot; -t, --tty &lt;device&gt;          search for devices at this tty\n\n&quot;
+				&quot; -d, --hci &lt;no/address&gt;      use only this source device address or number\n&quot;				
 				&quot; -N, --nonblock              nonblocking mode\n\n&quot;
 				&quot; -h, --help, --usage         this help text\n\n&quot;
 				&quot;Options to fusermount need to be preceeded by two dashes (--).\n&quot;</diff>
      <filename>fuse/obexautofs.c</filename>
    </modified>
    <modified>
      <diff>@@ -65,6 +65,7 @@ struct data_buffer {
 
 static obexftp_client_t *cli = NULL;
 static int transport = 0;
+static char *source = NULL; // &quot;00:11:22:33:44:55&quot;; &quot;hci0&quot;;
 static char *device = NULL; // &quot;00:11:22:33:44:55&quot;; &quot;/dev/ttyS0&quot;;
 static int channel = -1;
 
@@ -96,7 +97,7 @@ static int cli_open()
         for (retry = 0; retry &lt; 3; retry++) {
 
                 /* Connect */
-                if (obexftp_connect (cli, device, channel) &gt;= 0)
+                if (obexftp_connect_src (cli, source, device, channel, UUID_FBS, sizeof(UUID_FBS)) &gt;= 0)
                         return 0;
                 /* Still trying to connect */
 		sleep(1);
@@ -508,6 +509,7 @@ int main(int argc, char *argv[])
 			{&quot;irda&quot;,	no_argument, NULL, 'i'},
 			{&quot;bluetooth&quot;,	required_argument, NULL, 'b'},
 			{&quot;channel&quot;,	required_argument, NULL, 'B'},
+			{&quot;hci&quot;,	required_argument, NULL, 'd'},
 			{&quot;usb&quot;,		required_argument, NULL, 'u'},
 			{&quot;tty&quot;,		required_argument, NULL, 't'},
 			{&quot;network&quot;,	required_argument, NULL, 'n'},
@@ -517,7 +519,7 @@ int main(int argc, char *argv[])
 			{0, 0, 0, 0}
 		};
 		
-		c = getopt_long (argc, argv, &quot;+ib:B:u:t:n:Nh&quot;,
+		c = getopt_long (argc, argv, &quot;+ib:B:d:u:t:n:Nh&quot;,
 				 long_options, &amp;option_index);
 		if (c == -1)
 			break;
@@ -539,6 +541,10 @@ int main(int argc, char *argv[])
 		case 'B':
 			channel = atoi(optarg);
 			break;
+
+		case 'd':
+			source = optarg;
+			break;
 			
 		case 'u':
 			if (geteuid() != 0)
@@ -571,13 +577,14 @@ int main(int argc, char *argv[])
 
 		case 'h':
 			/* printf(&quot;ObexFS %s\n&quot;, VERSION); */
-			printf(&quot;Usage: %s [-i | -b &lt;dev&gt; [-B &lt;chan&gt;] | -t &lt;dev&gt;] [-- &lt;fuse options&gt;]\n&quot;
+			printf(&quot;Usage: %s [-i | -b &lt;dev&gt; [-B &lt;chan&gt;] [-d &lt;hci&gt;] | -u &lt;dev&gt; | -t &lt;dev&gt; | -n &lt;dev&gt;] [-- &lt;fuse options&gt;]\n&quot;
 				&quot;Transfer files from/to Mobile Equipment.\n&quot;
 				&quot;Copyright (c) 2002-2005 Christian W. Zuckschwerdt\n&quot;
 				&quot;\n&quot;
 				&quot; -i, --irda                  connect using IrDA transport\n&quot;
 				&quot; -b, --bluetooth &lt;device&gt;    connect to this bluetooth device\n&quot;
 				&quot; -B, --channel &lt;number&gt;      use this bluetooth channel when connecting\n&quot;
+				&quot; -d, --hci &lt;no/address&gt;      use source device with this address or number\n&quot;
 				&quot; -u, --usb &lt;interface&gt;       connect to this usb interface number\n&quot;
 				&quot; -t, --tty &lt;device&gt;          connect to this tty using a custom transport\n&quot;
 				&quot; -n, --network &lt;device&gt;      connect to this network host\n\n&quot;</diff>
      <filename>fuse/obexfs.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>12a9eca8802f57596784de356aba1cccf5d9e0dc</id>
    </parent>
  </parents>
  <author>
    <name>Christian W. Zuckschwerdt</name>
    <email>christian@zuckschwerdt.org</email>
  </author>
  <url>http://github.com/zuckschwerdt/obexfs/commit/afdf037f935275b5bb9b0afae3b623573d5ca189</url>
  <id>afdf037f935275b5bb9b0afae3b623573d5ca189</id>
  <committed-date>2009-04-26T10:17:24-07:00</committed-date>
  <authored-date>2009-04-26T10:17:24-07:00</authored-date>
  <message>adding option for source hci selection</message>
  <tree>c461b165bffec39c5a861a6e50b4a9282c8784e1</tree>
  <committer>
    <name>Christian W. Zuckschwerdt</name>
    <email>christian@zuckschwerdt.org</email>
  </committer>
</commit>
