[PATCH] smbclient timeout option

Jonathan Galpin jonathan at iqzero.net
Fri Feb 13 08:06:31 MST 2009


Hi Mark

I appreciate your publishing a patch to extend the samba timeout. This will
solve a backup pc problem for me.

I have applied the patch to the current 3.3.0 release, and it reports mostly
errors.

I have scoured the internet and have not yet found the information I need to
fix it, or to hack libsmbclient.

Would you mind giving me a little more direction, or a patched client.c?

Thanks,

Jonathan

Here is the patch rejection:
--------------------------
***************
*** 4055,4060 ****
   if (!cli) {
   return 1;
   }
   }

   while (cmd[0] != '\0')    {
--- 4058,4064 ----
   if (!cli) {
   return 1;
   }
+  cli_set_timeout(cli, timeout);
   }

   while (cmd[0] != '\0')    {
***************
*** 4516,4521 ****
   if (!cli) {
   return 1;
   }

   if (base_directory && *base_directory) {
   rc = do_cd(base_directory);
--- 4520,4526 ----
   if (!cli) {
   return 1;
   }
+  cli_set_timeout(cli, timeout);

   if (base_directory && *base_directory) {
   rc = do_cd(base_directory);
***************
*** 4547,4552 ****
   query_host, "IPC$", true, smb_encrypt);
   if (!cli)
   return 1;

   browse_host(true);

--- 4552,4558 ----
   query_host, "IPC$", true, smb_encrypt);
   if (!cli)
   return 1;
+  cli_set_timeout(cli, timeout);

   browse_host(true);

***************
*** 4571,4576 ****
   d_printf("NetBIOS over TCP disabled -- no workgroup available\n");
   return 1;
   }

   list_servers(lp_workgroup());

--- 4577,4583 ----
   d_printf("NetBIOS over TCP disabled -- no workgroup available\n");
   return 1;
   }
+  cli_set_timeout(cli, timeout);

   list_servers(lp_workgroup());

***************
*** 4593,4598 ****
   desthost, service, true, smb_encrypt);
   if (!cli)
   return 1;
   }

   recurse=true;
--- 4600,4606 ----
   desthost, service, true, smb_encrypt);
   if (!cli)
   return 1;
+  cli_set_timeout(cli, timeout);
   }

   recurse=true;
***************
*** 4698,4703 ****
   { "port", 'p', POPT_ARG_INT, &port, 'p', "Port to connect to", "PORT" },
   { "grepable", 'g', POPT_ARG_NONE, NULL, 'g', "Produce grepable output" },
                  { "browse", 'B', POPT_ARG_NONE, NULL, 'B', "Browse SMB
servers using DNS" },
   POPT_COMMON_SAMBA
   POPT_COMMON_CONNECTION
   POPT_COMMON_CREDENTIALS
--- 4706,4712 ----
   { "port", 'p', POPT_ARG_INT, &port, 'p', "Port to connect to", "PORT" },
   { "grepable", 'g', POPT_ARG_NONE, NULL, 'g', "Produce grepable output" },
                  { "browse", 'B', POPT_ARG_NONE, NULL, 'B', "Browse SMB
servers using DNS" },
+  { "timeout", 0, POPT_ARG_INT, &timeout, 0, "Set the response 
+ timeout", "MILLISECONDS" },
   POPT_COMMON_SAMBA
   POPT_COMMON_CONNECTION
   POPT_COMMON_CREDENTIALS

-- 
View this message in context: http://www.nabble.com/-PATCH--smbclient-timeout-option-tp21689774p21998137.html
Sent from the Samba - samba-technical mailing list archive at Nabble.com.



More information about the samba-technical mailing list