Browse Source

added database support to RLS module
db tables can be created using rls.sql - only temporarily (will be changed to standard way) !

Vaclav Kubart 20 years ago
parent
commit
6e2ace47f9
3 changed files with 11 additions and 11 deletions
  1. 1 1
      doc/presence/examples.xml
  2. 9 9
      lib/presence/pidf.c
  3. 1 1
      lib/xcap/resource_list.c

+ 1 - 1
doc/presence/examples.xml

@@ -26,8 +26,8 @@ loadmodule "/home/kubartv/sercvs/lib/ser/modules/registrar.so"
 loadmodule "/home/kubartv/sercvs/lib/ser/modules/textops.so"
 loadmodule "/home/kubartv/sercvs/lib/ser/modules/mysql.so"
 loadmodule "/home/kubartv/sercvs/lib/ser/modules/dialog.so"
-loadmodule "/home/kubartv/sercvs/lib/ser/modules/rls.so"
 loadmodule "/home/kubartv/sercvs/lib/ser/modules/pa.so"
+loadmodule "/home/kubartv/sercvs/lib/ser/modules/rls.so"
 
 loadmodule "/home/kubartv/sercvs/lib/ser/modules/auth.so"
 loadmodule "/home/kubartv/sercvs/lib/ser/modules/auth_db.so"

+ 9 - 9
lib/presence/pidf.c

@@ -34,28 +34,28 @@ static void doc_add_tuple(dstring_t *buf, presentity_info_t *p, presence_tuple_i
 	
 	dstr_append_zt(buf, "\t<tuple id=\"");
 	dstr_append_str(buf, &t->contact);
-	dstr_append_zt(buf, "\">\n");
+	dstr_append_zt(buf, "\">\r\n");
 	
-	if (t->status == presence_tuple_open) dstr_append_zt(buf, "\t\t<status><basic>open</basic></status>\n");
-	else dstr_append_zt(buf, "\t\t<status><basic>closed</basic></status>\n");
+	if (t->status == presence_tuple_open) dstr_append_zt(buf, "\t\t<status><basic>open</basic></status>\r\n");
+	else dstr_append_zt(buf, "\t\t<status><basic>closed</basic></status>\r\n");
 	
 	dstr_append_zt(buf, "\t\t<contact>");
 	dstr_append_str(buf, &t->contact);
-	dstr_append_zt(buf, "</contact>\n");
+	dstr_append_zt(buf, "</contact>\r\n");
 
-	dstr_append_zt(buf, "\t</tuple>\n");
+	dstr_append_zt(buf, "\t</tuple>\r\n");
 }
 
 static void doc_add_presentity(dstring_t *buf, presentity_info_t *p)
 {
 	presence_tuple_info_t *t;
 
-	DEBUG_LOG("doc_add_presentity()\n");
+	DEBUG_LOG("doc_add_presentity()\r\n");
 	dstr_append_zt(buf, "<presence xmlns=\"urn:ietf:params:xml:ns:pidf\" entity=\"sip:");
 	dstr_append_str(buf, &p->presentity);
-	dstr_append_zt(buf, "\">\n");
+	dstr_append_zt(buf, "\">\r\n");
 	
-	DEBUG_LOG("doc_add_presentity(): adding tuples\n");
+	DEBUG_LOG("doc_add_presentity(): adding tuples\r\n");
 	t = p->first_tuple;
 	while (t) {
 		doc_add_tuple(buf, p, t);
@@ -83,7 +83,7 @@ int create_pidf_document(presentity_info_t *p, str_t *dst, str_t *dst_content_ty
 	
 	dstr_init(&buf, 2048);
 	
-	dstr_append_zt(&buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+	dstr_append_zt(&buf, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n");
 	doc_add_presentity(&buf, p);
 	
 	dst->len = dstr_get_data_length(&buf);

+ 1 - 1
lib/xcap/resource_list.c

@@ -450,7 +450,7 @@ static int create_flat_list(service_t *srv, xcap_query_t *xcap_params, const cha
 /* ------- helper functions for rls examining ------- */
 
 /** compare str_t and zero terminated string */
-int str_strcmp(const str_t *a, const char *b)
+static int str_strcmp(const str_t *a, const char *b)
 {
 	int i;