... | ... |
@@ -149,7 +149,7 @@ int xml_publ_handl(struct sip_msg* msg) |
149 | 149 |
if(doc== NULL) |
150 | 150 |
{ |
151 | 151 |
LM_ERR("bad body format\n"); |
152 |
- if(slb.send_reply(msg, 415, &pu_415_rpl)== -1) |
|
152 |
+ if(slb.freply(msg, 415, &pu_415_rpl) < 0) |
|
153 | 153 |
{ |
154 | 154 |
LM_ERR("while sending '415 Unsupported media type' reply\n"); |
155 | 155 |
} |
... | ... |
@@ -52,7 +52,7 @@ |
52 | 52 |
#include "../presence/hash.h" |
53 | 53 |
#include "../presence/notify.h" |
54 | 54 |
#include "../xcap_client/xcap_functions.h" |
55 |
-#include "../sl/sl_api.h" |
|
55 |
+#include "../../modules/sl/sl.h" |
|
56 | 56 |
#include "pidf.h" |
57 | 57 |
#include "add_events.h" |
58 | 58 |
#include "presence_xml.h" |
... | ... |
@@ -91,8 +91,8 @@ int disable_winfo = 0; |
91 | 91 |
int disable_bla = 1; |
92 | 92 |
int passive_mode = 0; |
93 | 93 |
|
94 |
-/* SL bind */ |
|
95 |
-struct sl_binds slb; |
|
94 |
+/** SL API structure */ |
|
95 |
+sl_api_t slb; |
|
96 | 96 |
|
97 | 97 |
/* database connection */ |
98 | 98 |
db1_con_t *pxml_db = NULL; |
... | ... |
@@ -189,10 +189,9 @@ static int mod_init(void) |
189 | 189 |
LM_ERR("error during table version check.\n"); |
190 | 190 |
return -1; |
191 | 191 |
} |
192 |
- /* load SL API */ |
|
193 |
- if(load_sl_api(&slb)==-1) |
|
194 |
- { |
|
195 |
- LM_ERR("can't load sl functions\n"); |
|
192 |
+ /* bind the SL API */ |
|
193 |
+ if (sl_load_api(&slb)!=0) { |
|
194 |
+ LM_ERR("cannot bind to SL API\n"); |
|
196 | 195 |
return -1; |
197 | 196 |
} |
198 | 197 |
|
... | ... |
@@ -37,7 +37,7 @@ |
37 | 37 |
#define _PRES_XML_H_ |
38 | 38 |
|
39 | 39 |
#include "../../lib/srdb1/db.h" |
40 |
-#include "../sl/sl_api.h" |
|
40 |
+#include "../../modules/sl/sl.h" |
|
41 | 41 |
#include "../presence/event_list.h" |
42 | 42 |
#include "../presence/presence.h" |
43 | 43 |
#include "../presence/presentity.h" |
... | ... |
@@ -48,7 +48,9 @@ typedef struct xcap_serv |
48 | 48 |
char* addr; |
49 | 49 |
unsigned int port; |
50 | 50 |
struct xcap_serv* next; |
51 |
-}xcap_serv_t; |
|
51 |
+} xcap_serv_t; |
|
52 |
+ |
|
53 |
+extern sl_api_t slb; |
|
52 | 54 |
|
53 | 55 |
extern str xcap_table; |
54 | 56 |
extern add_event_t pres_add_event; |