1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
--- source/python/py_common.c 2002-12-22 03:07:40.000000000 +0100
+++ source/python/py_common.c 2002-11-29 11:50:22.000000000 +0100
@@ -45,9 +45,6 @@
void py_samba_init(void)
{
- extern pstring global_myname;
- char *p;
-
if (initialised)
return;
@@ -59,11 +56,7 @@
/* Misc other stuff */
load_interfaces();
-
- fstrcpy(global_myname, myhostname());
- p = strchr(global_myname, '.');
- if (p)
- *p = 0;
+ init_names();
initialised = True;
}
--- source/python/py_smb.c 2002-11-27 03:54:20.000000000 +0100
+++ source/python/py_smb.c 2002-11-29 11:50:22.000000000 +0100
@@ -61,7 +61,6 @@
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 @@
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);
|