Browse code

- fixed warning for casts and re-declaration of functions and vars

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3501 689a6050-402a-0410-94f2-e92a70836424

Bogdan-Andrei Iancu authored on 06/01/2008 09:50:24
Showing 18 changed files
... ...
@@ -135,14 +135,22 @@ void destroy(void);
135 135
  * Exported functions
136 136
  */
137 137
 static cmd_export_t cmds[] = {
138
-	{"jab_send_message",       xj_send_message,                     0,              0, 0, REQUEST_ROUTE},
139
-	{"jab_join_jconf",         xj_join_jconf,                       0,              0, 0, REQUEST_ROUTE},
140
-	{"jab_exit_jconf",         xj_exit_jconf,                       0,              0, 0, REQUEST_ROUTE},
141
-	{"jab_go_online",          xj_go_online,                        0,              0, 0, REQUEST_ROUTE},
142
-	{"jab_go_offline",         xj_go_offline,                       0,              0, 0, REQUEST_ROUTE},
143
-	{"jab_register_watcher",   (cmd_function)xj_register_watcher,   XJ_NO_SCRIPT_F, 0, 0, 0            },
144
-	{"jab_unregister_watcher", (cmd_function)xj_unregister_watcher, XJ_NO_SCRIPT_F, 0, 0, 0            },
145
-	{"load_xjab",              (cmd_function)load_xjab,             XJ_NO_SCRIPT_F, 0, 0, 0            },
138
+	{"jab_send_message",       (cmd_function)xj_send_message,       
139
+			0, 0, 0, REQUEST_ROUTE},
140
+	{"jab_join_jconf",         (cmd_function)xj_join_jconf,         
141
+			0, 0, 0, REQUEST_ROUTE},
142
+	{"jab_exit_jconf",         (cmd_function)xj_exit_jconf,
143
+			0, 0, 0, REQUEST_ROUTE},
144
+	{"jab_go_online",          (cmd_function)xj_go_online,
145
+			0, 0, 0, REQUEST_ROUTE},
146
+	{"jab_go_offline",         (cmd_function)xj_go_offline,
147
+			0, 0, 0, REQUEST_ROUTE},
148
+	{"jab_register_watcher",   (cmd_function)xj_register_watcher,   
149
+			XJ_NO_SCRIPT_F, 0, 0, 0            },
150
+	{"jab_unregister_watcher", (cmd_function)xj_unregister_watcher,
151
+			XJ_NO_SCRIPT_F, 0, 0, 0            },
152
+	{"load_xjab",              (cmd_function)load_xjab,
153
+			XJ_NO_SCRIPT_F, 0, 0, 0            },
146 154
 	{0, 0, 0, 0, 0, 0}
147 155
 };
148 156
 
... ...
@@ -60,7 +60,6 @@ xj_pres_cell xj_pres_cell_new(void);
60 60
 void xj_pres_cell_free(xj_pres_cell);
61 61
 void xj_pres_cell_free_all(xj_pres_cell);
62 62
 int xj_pres_cell_init(xj_pres_cell, str*, pa_callback_f, void*);
63
-int xj_pres_cell_init(xj_pres_cell, str*, pa_callback_f, void*);
64 63
 int xj_pres_cell_update(xj_pres_cell, pa_callback_f, void*);
65 64
 
66 65
 xj_pres_list xj_pres_list_init(void);
... ...
@@ -49,7 +49,6 @@
49 49
 #define ALLOC_SIZE 3000
50 50
 #define MAX_FORWARD 70
51 51
 
52
-extern struct tm_binds tmb;
53 52
 c_back_param* shm_dup_cbparam(subs_t* , subs_t*);
54 53
 void free_cbparam(c_back_param* cb_param);
55 54
 
... ...
@@ -94,8 +94,6 @@ struct sl_binds slb;
94 94
 static int mod_init(void);
95 95
 static int child_init(int);
96 96
 void destroy(void);
97
-int handle_publish(struct sip_msg*, char*, char*);
98
-int handle_subscribe(struct sip_msg*, char*, char*);
99 97
 int stored_pres_info(struct sip_msg* msg, char* pres_uri, char* s);
100 98
 static int fixup_presence(void** param, int param_no);
101 99
 struct mi_root* mi_refreshWatchers(struct mi_root* cmd, void* param);
... ...
@@ -44,10 +44,6 @@
44 44
 #include "hash.h"
45 45
 #include "utils_func.h"
46 46
 
47
-extern int use_db;
48
-extern char* presentity_table;
49
-extern db_con_t* pa_db;
50
-extern db_func_t pa_dbf;
51 47
 
52 48
 static str pu_200_rpl  = str_init("OK");
53 49
 static str pu_412_rpl  = str_init("Conditional request failed");
... ...
@@ -44,12 +44,7 @@
44 44
 #include "publish.h"
45 45
 #include "presentity.h"
46 46
 
47
-extern db_con_t* pa_db;
48
-extern db_func_t pa_dbf;
49 47
 extern gen_lock_set_t* set;
50
-extern int counter ;
51
-extern int pid;
52
-extern int startup_time;
53 48
 
54 49
 static str pu_400a_rpl = str_init("Bad request");
55 50
 static str pu_400b_rpl = str_init("Invalid request");
... ...
@@ -38,11 +38,10 @@
38 38
 #include "notify.h"
39 39
 #include "../pua/hash.h"
40 40
 
41
-int get_stored_info(struct sip_msg* msg, subs_t* subs, int* error_ret, str* reply_str);
42
-int get_database_info(struct sip_msg* msg, subs_t* subs, int* error_ret, str* reply_str);
43
-int refresh_watcher(str* pres_uri, str* watcher_uri, str* event, 
44
-		int status, str* reason);
45
-
41
+int get_stored_info(struct sip_msg* msg, subs_t* subs, int* error_ret,
42
+		str* reply_str);
43
+int get_database_info(struct sip_msg* msg, subs_t* subs, int* error_ret,
44
+		str* reply_str);
46 45
 int get_db_subs_auth(subs_t* subs, int* found);
47 46
 int insert_db_subs_auth(subs_t* subs);
48 47
 
... ...
@@ -42,7 +42,6 @@
42 42
 #include "presence_xml.h"
43 43
 
44 44
 static str pu_415_rpl  = str_init("Unsupported media type");
45
-extern add_event_t pres_add_event;
46 45
 
47 46
 int xml_add_events(void)
48 47
 {
... ...
@@ -32,6 +32,7 @@
32 32
 #include "../../db/db.h"
33 33
 #include "../sl/sl_api.h"
34 34
 #include "../presence/event_list.h"
35
+#include "../presence/presence.h"
35 36
 #include "../xcap_client/xcap_functions.h"
36 37
 
37 38
 typedef struct xcap_serv
... ...
@@ -51,7 +52,4 @@ extern int integrated_xcap_server;
51 52
 extern xcap_serv_t* xs_list;
52 53
 extern xcapGetNewDoc_t xcap_GetNewDoc;
53 54
 
54
-/* SL bind */
55
-extern struct sl_binds slb;
56
-
57 55
 #endif
... ...
@@ -77,9 +77,6 @@ static int mod_init(void);
77 77
 static int child_init(int);
78 78
 static void destroy(void);
79 79
 
80
-int send_subscribe(subs_info_t*);
81
-int send_publish(publ_info_t*);
82
-
83 80
 int update_pua(ua_pres_t* p, unsigned int hash_code);
84 81
 ua_pres_t* build_upsubs_cbparam(ua_pres_t* pres);
85 82
 ua_pres_t* build_uppubl_cbparam(ua_pres_t* p);
... ...
@@ -32,14 +32,12 @@
32 32
 #include "../pua/pua_bind.h"
33 33
 
34 34
 extern int is_bla_aor;
35
-extern str default_domain;
36 35
 extern str header_name;
37 36
 extern str outbound_proxy;
38 37
 
39 38
 extern send_publish_t pua_send_publish;
40 39
 extern send_subscribe_t pua_send_subscribe;
41 40
 extern query_dialog_t pua_is_dialog;
42
-extern query_dialog_t pua_is_dialog;
43 41
 extern int bla_handle_notify(struct sip_msg* msg, char* s1, char* s2);
44 42
 
45 43
 #endif
... ...
@@ -33,7 +33,6 @@
33 33
 #include "registrar_cb.h"
34 34
 #include "pua_bla.h"
35 35
 
36
-extern int is_bla_aor;
37 36
 
38 37
 void bla_cb(ucontact_t* c, int type, void* param)
39 38
 {
... ...
@@ -64,10 +64,7 @@ static int child_init(int);
64 64
 static void destroy(void);
65 65
 
66 66
 int pua_set_publish(struct sip_msg* , char*, char*);
67
-void ul_publish(ucontact_t* c, int type, void* param);
68 67
 
69
-send_publish_t pua_send_publish;
70
-send_subscribe_t pua_send_subscribe;
71 68
 
72 69
 static cmd_export_t cmds[]=
73 70
 {
... ...
@@ -31,7 +31,5 @@ send_subscribe_t pua_send_subscribe;
31 31
 void ul_publish(ucontact_t* c, int type, void* param);
32 32
 int pua_unset_publish(struct sip_msg* msg , void* param);
33 33
 
34
-extern int pua_ul_publish; 
35
-extern str default_domain;
36 34
 extern str pres_prefix;
37 35
 #endif
... ...
@@ -81,8 +81,6 @@ xmlNodeGetNodeContentByName_t XMLNodeGetNodeContentByName;
81 81
 static int mod_init(void);
82 82
 static int child_init(int);
83 83
 
84
-int Notify2Xmpp(struct sip_msg* , char*, char*);
85
-void pres_Xmpp2Sip(char* xmpp_msg, int type, void *param);
86 84
 static int fixup_pua_xmpp(void** param, int param_no);
87 85
 
88 86
 static cmd_export_t cmds[]=
... ...
@@ -34,8 +34,6 @@
34 34
 #include "../xmpp/xmpp_api.h"
35 35
 
36 36
 
37
-extern struct tm_binds tmb;
38
-
39 37
 extern send_subscribe_t pua_send_subscribe;
40 38
 extern send_publish_t pua_send_publish;
41 39
 extern query_dialog_t pua_is_dialog;
... ...
@@ -64,9 +64,6 @@ str* constr_multipart_body(db_res_t* result,char** cid_array,
64 64
 
65 65
 dlg_t* rls_notify_dlg(subs_t* subs);
66 66
 
67
-int rls_send_notify(subs_t* subs, str* body, char* start_cid,
68
-		char* boudary_string);
69
-dlg_t* rls_notify_dlg(subs_t* subs);
70 67
 void rls_notify_callback( struct cell *t, int type, struct tmcb_params *ps);
71 68
 
72 69
 
... ...
@@ -53,10 +53,6 @@ extern int xmpp_send_sip_msg(char *from, char *to, char *msg);
53 53
 extern void xmpp_free_pipe_cmd(struct xmpp_pipe_cmd *cmd);
54 54
 
55 55
 /* util.c */
56
-char *decode_uri_sip_xmpp(char *uri);
57
-char *encode_uri_sip_xmpp(char *uri);
58
-char *decode_uri_xmpp_sip(char *jid);
59
-char *encode_uri_xmpp_sip(char *jid);
60 56
 char *extract_domain(char *jid);
61 57
 char *random_secret(void);
62 58
 char *db_key(char *secret, char *domain, char *id);