aboutsummaryrefslogtreecommitdiff
path: root/network/dillo/dillo-3.0.5-fno-common.patch
blob: df80f55afaf86780e4cf265f77e9e8d6fba9a0dd (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
--- a/dpid/dpid.c
+++ b/dpid/dpid.c
@@ -41,6 +41,26 @@
 volatile sig_atomic_t caught_sigchld = 0;
 char *SharedKey = NULL;
 
+char *srs_name;
+
+/*! dpid's service request socket file descriptor */
+int srs_fd;
+
+/*! Number of available plugins */
+int numdpis;
+
+/*! Number of sockets being watched */
+int numsocks;
+
+/*! State information for each plugin. */
+struct dp *dpi_attr_list;
+
+/*! service served for each plugin  */
+Dlist *services_list;
+
+/*! Set of sockets watched for connections */
+fd_set sock_set;
+
 /*! Remove dpid_comm_keys file.
  * This avoids that dillo instances connect to a stale port after dpid
  * has exited (e.g. after a reboot).
--- a/dpid/dpid.h
+++ b/dpid/dpid.h
@@ -25,10 +25,10 @@
 
 /*! \TODO: Should read this from dillorc */
 #define SRS_NAME "dpid.srs"
-char *srs_name;
+extern char *srs_name;
 
 /*! dpid's service request socket file descriptor */
-int srs_fd;
+extern int srs_fd;
 
 /*! plugin state information
  */
@@ -49,19 +49,19 @@
 };
 
 /*! Number of available plugins */
-int numdpis;
+extern int numdpis;
 
 /*! Number of sockets being watched */
-int numsocks;
+extern int numsocks;
 
 /*! State information for each plugin. */
-struct dp *dpi_attr_list;
+extern struct dp *dpi_attr_list;
 
 /*! service served for each plugin  */
-Dlist *services_list;
+extern Dlist *services_list;
 
 /*! Set of sockets watched for connections */
-fd_set sock_set;
+extern fd_set sock_set;
 
 /*! Set to 1 by the SIGCHLD handler dpi_sigchld */
 extern volatile sig_atomic_t caught_sigchld;
--- a/dpid/dpid_common.c
+++ b/dpid/dpid_common.c
@@ -14,6 +14,9 @@
 #include <unistd.h>
 #include "dpid_common.h"
 
+/*! Error codes for dpid */
+dpi_errno_t dpi_errno;
+
 /*
  * Send a verbose error message.
  */
--- a/dpid/dpid_common.h
+++ b/dpid/dpid_common.h
@@ -35,12 +35,13 @@
 #define CKD_WRITE(fd, msg) ckd_write(fd, msg, __FILE__, __LINE__)
 #define CKD_CLOSE(fd)      ckd_close(fd, __FILE__, __LINE__)
 
-
 /*! Error codes for dpid */
-enum {
+typedef enum {
    no_errors,
    dpid_srs_addrinuse /* dpid service request socket address already in use */
-} dpi_errno;
+} dpi_errno_t;
+
+extern dpi_errno_t dpi_errno;
 
 /*! Intended for identifying dillo plugins
  * and related files