diff options
author | Tim Potter <tpot@samba.org> | 2002-11-22 06:15:43 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-11-22 06:15:43 +0000 |
commit | d1bedec87c435fb874991fda109911e44ea0bf4d (patch) | |
tree | 5506d7e0800cff8fb5568cf87196c16ca80fe776 | |
parent | a75f1ba9d4b314f793bf7877f329dc420546c4b0 (diff) | |
download | samba-d1bedec87c435fb874991fda109911e44ea0bf4d.tar.gz samba-d1bedec87c435fb874991fda109911e44ea0bf4d.tar.bz2 samba-d1bedec87c435fb874991fda109911e44ea0bf4d.zip |
Fixed some globals that escaped the recent globalcide.
(This used to be commit 4580e16908fe06a2c2b6738683b7cb840467e61c)
-rw-r--r-- | source3/python/py_common.c | 9 | ||||
-rw-r--r-- | source3/python/py_smb.c | 3 |
2 files changed, 2 insertions, 10 deletions
diff --git a/source3/python/py_common.c b/source3/python/py_common.c index 364271d57c..6e299470bf 100644 --- a/source3/python/py_common.c +++ b/source3/python/py_common.c @@ -45,9 +45,6 @@ static BOOL initialised; void py_samba_init(void) { - extern pstring global_myname; - char *p; - if (initialised) return; @@ -59,11 +56,7 @@ void py_samba_init(void) /* Misc other stuff */ load_interfaces(); - - fstrcpy(global_myname, myhostname()); - p = strchr(global_myname, '.'); - if (p) - *p = 0; + init_names(); initialised = True; } diff --git a/source3/python/py_smb.c b/source3/python/py_smb.c index 41b8237a8a..efb7d0a5fd 100644 --- a/source3/python/py_smb.c +++ b/source3/python/py_smb.c @@ -61,7 +61,6 @@ static PyObject *py_smb_session_request(PyObject *self, PyObject *args, static char *kwlist[] = { "called", "calling", NULL }; char *calling_name = NULL, *called_name; struct nmb_name calling, called; - extern pstring global_myname; BOOL result; if (!PyArg_ParseTupleAndKeywords(args, kw, "s|s", kwlist, &called_name, @@ -69,7 +68,7 @@ static PyObject *py_smb_session_request(PyObject *self, PyObject *args, return NULL; if (!calling_name) - calling_name = global_myname; + calling_name = global_myname(); make_nmb_name(&calling, calling_name, 0x00); make_nmb_name(&called, called_name, 0x20); |