/*****************************************************
return a connection to a server
*******************************************************/
-static struct smbcli_state *do_connection(char *the_service, int maxprotocol)
+static struct smbcli_state *do_connection(const char *the_service, bool unicode, int maxprotocol)
{
struct smbcli_state *c;
struct nmb_name called, calling;
DEBUG(4,("%d: session request ok\n", sys_getpid()));
- if (!smbcli_negprot(c, maxprotocol)) {
+ if (!smbcli_negprot(c, unicode, maxprotocol)) {
DEBUG(0,("%d: protocol negotiation failed\n", sys_getpid()));
talloc_free(c);
return NULL;
* not exit after open_sockets() or send_login() errors,
* as the smbfs mount would then have no way to recover.
*/
-static void send_fs_socket(char *the_service, char *mount_point, struct smbcli_state *c)
+static void send_fs_socket(const char *the_service, char *mount_point, struct smbcli_state *c)
{
int fd, closed = 0, res = 1;
pid_t parentpid = getppid();
CatchSignal(SIGUSR1, &usr1_handler);
pause();
DEBUG(2,("mount.smbfs[%d]: got signal, getting new socket\n", sys_getpid()));
- c = do_connection(the_service);
+ c = do_connection(the_service, lp_unicode(global_loadparm), lp_cli_maxprotocol(global_loadparm));
}
}
}
- c = do_connection(service, lp_cli_maxprotocol(global_loadparm));
+ c = do_connection(service, lp_unicode(global_loadparm), lp_cli_maxprotocol(global_loadparm));
if (!c) {
fprintf(stderr,"SMB connection failed\n");
exit(1);