diff options
author | Volker Lendecke <Volker.Lendecke@SerNet.DE> | 2007-10-27 21:15:07 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-10-27 12:50:36 -0700 |
commit | a97b33baad5bbce7e8004346aa3a812ec4f91f0e (patch) | |
tree | 50d0a92b80dc743256d4c0a88ad494c55acf333e /source3/client | |
parent | acc95a43a1a8079dc41aa1dd882bdf7dd25a6cf2 (diff) | |
download | samba-a97b33baad5bbce7e8004346aa3a812ec4f91f0e.tar.gz samba-a97b33baad5bbce7e8004346aa3a812ec4f91f0e.tar.bz2 samba-a97b33baad5bbce7e8004346aa3a812ec4f91f0e.zip |
Two patches
Hi!
Can you check and push them?
Thanks,
Volker
From b488af5905e2dee12a1a72a3b40801ae5c26f24f Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl@sernet.de>
Date: Sat, 27 Oct 2007 14:20:09 +0200
Subject: [PATCH] Fix some warnings and errors
(This used to be commit e17d3e10e860c96b6d5208e5fe51e43b8e58c174)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/smbmount.c | 10 | ||||
-rw-r--r-- | source3/client/smbumount.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c index 95adc9a8f2..7636adb2a7 100644 --- a/source3/client/smbmount.c +++ b/source3/client/smbmount.c @@ -37,7 +37,7 @@ static pstring mpoint; static pstring service; static pstring options; -static struct in_addr dest_ip; +static struct sockaddr_storage dest_ip; static bool have_ip; static int smb_port = 0; static bool got_user; @@ -122,7 +122,7 @@ static struct cli_state *do_connection(char *the_service) struct cli_state *c; struct nmb_name called, calling; char *server_n; - struct in_addr ip; + struct sockaddr_storage ip; pstring server; char *share; @@ -146,7 +146,7 @@ static struct cli_state *do_connection(char *the_service) make_nmb_name(&called , server, 0x20); again: - zero_ip_v4(&ip); + zero_addr(&ip, INADDR_ANY); if (have_ip) ip = dest_ip; /* have to open a new connection */ @@ -798,8 +798,8 @@ static void parse_mount_smb(int argc, char **argv) } else if(!strcmp(opts, "debug")) { DEBUGLEVEL = val; } else if(!strcmp(opts, "ip")) { - dest_ip = *interpret_addr2(opteq+1); - if (is_zero_ip_v4(dest_ip)) { + if (!interpret_string_addr(&dest_ip, opteq+1, + 0)) { fprintf(stderr,"Can't resolve address %s\n", opteq+1); exit(1); } diff --git a/source3/client/smbumount.c b/source3/client/smbumount.c index 4be54b6793..1664e4b555 100644 --- a/source3/client/smbumount.c +++ b/source3/client/smbumount.c @@ -80,7 +80,7 @@ umount_ok(const char *mount_point) static char * canonicalize (char *path) { - char *canonical = malloc (PATH_MAX + 1); + char *canonical = (char*)malloc (PATH_MAX + 1); if (!canonical) { fprintf(stderr, "Error! Not enough memory!\n"); |