8c5931e4448b69deabb154d1835e48c05539793d
[ira/wip.git] / packaging / SuSE / samba-3.0.0-python.diff
1 --- source/python/py_common.c   2002-12-22 03:07:40.000000000 +0100
2 +++ source/python/py_common.c   2002-11-29 11:50:22.000000000 +0100
3 @@ -45,9 +45,6 @@
4  
5  void py_samba_init(void)
6  {
7 -       extern pstring global_myname;
8 -       char *p;
9 -
10         if (initialised)
11                 return;
12  
13 @@ -59,11 +56,7 @@
14         /* Misc other stuff */
15  
16         load_interfaces();
17 -       
18 -       fstrcpy(global_myname, myhostname());
19 -       p = strchr(global_myname, '.');
20 -       if (p)
21 -               *p = 0;
22 +       init_names();
23  
24         initialised = True;
25  }
26 --- source/python/py_smb.c      2002-11-27 03:54:20.000000000 +0100
27 +++ source/python/py_smb.c      2002-11-29 11:50:22.000000000 +0100
28 @@ -61,7 +61,6 @@
29         static char *kwlist[] = { "called", "calling", NULL };
30         char *calling_name = NULL, *called_name;
31         struct nmb_name calling, called;
32 -       extern pstring global_myname;
33         BOOL result;
34  
35         if (!PyArg_ParseTupleAndKeywords(args, kw, "s|s", kwlist, &called_name, 
36 @@ -69,7 +68,7 @@
37                 return NULL;
38  
39         if (!calling_name)
40 -               calling_name = global_myname;
41 +               calling_name = global_myname();
42  
43         make_nmb_name(&calling, calling_name, 0x00);
44         make_nmb_name(&called, called_name, 0x20);