Module: sip-router
Branch: master
Commit: 8623eeb1c2762d299cd88e0b7bc8d8fdb8fa2a72
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8623eeb…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Jul 27 12:18:05 2011 +0100
srdb1: Added support for logging of messages > 64k in sip_trace with MySQL
- Some SIP requests - especially full-state NOTIFYs for large resource
losts - can easily exceed 64k.
- This change makes MySQL use the mediumtext type for message contents.
- Feature added by Andrew Miller at Crocodile RCS
---
lib/srdb1/schema/sip_trace.xml | 2 +-
utils/kamctl/mysql/siptrace-create.sql | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/srdb1/schema/sip_trace.xml b/lib/srdb1/schema/sip_trace.xml
index 0b492c4..630f0dc 100644
--- a/lib/srdb1/schema/sip_trace.xml
+++ b/lib/srdb1/schema/sip_trace.xml
@@ -53,7 +53,7 @@
<column>
<name>msg</name>
- <type>text</type>
+ <type>largetext</type>
<description>Full SIP message</description>
</column>
diff --git a/utils/kamctl/mysql/siptrace-create.sql b/utils/kamctl/mysql/siptrace-create.sql
index da4a11f..9021d0c 100644
--- a/utils/kamctl/mysql/siptrace-create.sql
+++ b/utils/kamctl/mysql/siptrace-create.sql
@@ -1,7 +1,7 @@
INSERT INTO version (table_name, table_version) values ('sip_trace','2');
CREATE TABLE sip_trace (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
- time_stamp DATETIME DEFAULT '1900-01-01 00:00:01' NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
+ time_stamp TIMESTAMP WITHOUT TIME ZONE DEFAULT '1900-01-01 00:00:01' NOT NULL,
callid VARCHAR(255) DEFAULT '' NOT NULL,
traced_user VARCHAR(128) DEFAULT '' NOT NULL,
msg TEXT NOT NULL,
@@ -11,10 +11,10 @@ CREATE TABLE sip_trace (
toip VARCHAR(50) DEFAULT '' NOT NULL,
fromtag VARCHAR(64) DEFAULT '' NOT NULL,
direction VARCHAR(4) DEFAULT '' NOT NULL
-) ENGINE=MyISAM;
+);
-CREATE INDEX traced_user_idx ON sip_trace (traced_user);
-CREATE INDEX date_idx ON sip_trace (time_stamp);
-CREATE INDEX fromip_idx ON sip_trace (fromip);
-CREATE INDEX callid_idx ON sip_trace (callid);
+CREATE INDEX sip_trace_traced_user_idx ON sip_trace (traced_user);
+CREATE INDEX sip_trace_date_idx ON sip_trace (time_stamp);
+CREATE INDEX sip_trace_fromip_idx ON sip_trace (fromip);
+CREATE INDEX sip_trace_callid_idx ON sip_trace (callid);
Module: sip-router
Branch: master
Commit: 6033da2e644ccdca7fa57bee03f82cb03c36e45e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6033da2…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Jul 27 12:13:25 2011 +0100
srdb1, modules_k/xcap_server: Added support for XML documents larger than 64k in MySQL
- It is easily possible for some XML documents (particularly resource lists
used as a Network Address Book) to exceed 64k in size.
- Feature added by Andrew Miller at Crocodile RCS
---
lib/srdb1/schema/pr_xcap.xml | 2 +-
modules_k/xcap_server/xcap_server.c | 2 +-
utils/kamctl/mysql/presence-create.sql | 70 ++++++++++++++++----------------
3 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/lib/srdb1/schema/pr_xcap.xml b/lib/srdb1/schema/pr_xcap.xml
index 92ffda3..ef30273 100644
--- a/lib/srdb1/schema/pr_xcap.xml
+++ b/lib/srdb1/schema/pr_xcap.xml
@@ -44,7 +44,7 @@
<column>
<name>doc</name>
- <type>binary</type>
+ <type>largebinary</type>
<description>doc</description>
</column>
diff --git a/modules_k/xcap_server/xcap_server.c b/modules_k/xcap_server/xcap_server.c
index 1a041e3..db1e0f5 100644
--- a/modules_k/xcap_server/xcap_server.c
+++ b/modules_k/xcap_server/xcap_server.c
@@ -351,7 +351,7 @@ static int xcaps_put_db(str* user, str *domain, xcap_uri_t *xuri, str *etag,
ncols++;
qcols[ncols] = &str_doc_col;
- qvals[ncols].type = DB1_STR;
+ qvals[ncols].type = DB1_BLOB;
qvals[ncols].nul = 0;
qvals[ncols].val.str_val= *doc;
ncols++;
diff --git a/utils/kamctl/mysql/presence-create.sql b/utils/kamctl/mysql/presence-create.sql
index 740149b..3b2608c 100644
--- a/utils/kamctl/mysql/presence-create.sql
+++ b/utils/kamctl/mysql/presence-create.sql
@@ -1,20 +1,20 @@
INSERT INTO version (table_name, table_version) values ('presentity','3');
CREATE TABLE presentity (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
username VARCHAR(64) NOT NULL,
domain VARCHAR(64) NOT NULL,
event VARCHAR(64) NOT NULL,
etag VARCHAR(64) NOT NULL,
- expires INT(11) NOT NULL,
- received_time INT(11) NOT NULL,
- body BLOB NOT NULL,
+ expires INTEGER NOT NULL,
+ received_time INTEGER NOT NULL,
+ body BYTEA NOT NULL,
sender VARCHAR(128) NOT NULL,
- CONSTRAINT presentity_idx UNIQUE (username, domain, event, etag)
-) ENGINE=MyISAM;
+ CONSTRAINT presentity_presentity_idx UNIQUE (username, domain, event, etag)
+);
INSERT INTO version (table_name, table_version) values ('active_watchers','9');
CREATE TABLE active_watchers (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
presentity_uri VARCHAR(128) NOT NULL,
watcher_username VARCHAR(64) NOT NULL,
watcher_domain VARCHAR(64) NOT NULL,
@@ -25,68 +25,68 @@ CREATE TABLE active_watchers (
to_tag VARCHAR(64) NOT NULL,
from_tag VARCHAR(64) NOT NULL,
callid VARCHAR(255) NOT NULL,
- local_cseq INT(11) NOT NULL,
- remote_cseq INT(11) NOT NULL,
+ local_cseq INTEGER NOT NULL,
+ remote_cseq INTEGER NOT NULL,
contact VARCHAR(128) NOT NULL,
record_route TEXT,
- expires INT(11) NOT NULL,
- status INT(11) DEFAULT 2 NOT NULL,
+ expires INTEGER NOT NULL,
+ status INTEGER DEFAULT 2 NOT NULL,
reason VARCHAR(64) NOT NULL,
- version INT(11) DEFAULT 0 NOT NULL,
+ version INTEGER DEFAULT 0 NOT NULL,
socket_info VARCHAR(64) NOT NULL,
local_contact VARCHAR(128) NOT NULL,
- CONSTRAINT active_watchers_idx UNIQUE (presentity_uri, callid, to_tag, from_tag)
-) ENGINE=MyISAM;
+ CONSTRAINT active_watchers_active_watchers_idx UNIQUE (presentity_uri, callid, to_tag, from_tag)
+);
INSERT INTO version (table_name, table_version) values ('watchers','3');
CREATE TABLE watchers (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
presentity_uri VARCHAR(128) NOT NULL,
watcher_username VARCHAR(64) NOT NULL,
watcher_domain VARCHAR(64) NOT NULL,
event VARCHAR(64) DEFAULT 'presence' NOT NULL,
- status INT(11) NOT NULL,
+ status INTEGER NOT NULL,
reason VARCHAR(64),
- inserted_time INT(11) NOT NULL,
- CONSTRAINT watcher_idx UNIQUE (presentity_uri, watcher_username, watcher_domain, event)
-) ENGINE=MyISAM;
+ inserted_time INTEGER NOT NULL,
+ CONSTRAINT watchers_watcher_idx UNIQUE (presentity_uri, watcher_username, watcher_domain, event)
+);
INSERT INTO version (table_name, table_version) values ('xcap','3');
CREATE TABLE xcap (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
username VARCHAR(64) NOT NULL,
domain VARCHAR(64) NOT NULL,
- doc BLOB NOT NULL,
- doc_type INT(11) NOT NULL,
+ doc BYTEA NOT NULL,
+ doc_type INTEGER NOT NULL,
etag VARCHAR(64) NOT NULL,
- source INT(11) NOT NULL,
+ source INTEGER NOT NULL,
doc_uri VARCHAR(128) NOT NULL,
- port INT(11) NOT NULL,
- CONSTRAINT account_doc_type_idx UNIQUE (username, domain, doc_type, doc_uri)
-) ENGINE=MyISAM;
+ port INTEGER NOT NULL,
+ CONSTRAINT xcap_account_doc_type_idx UNIQUE (username, domain, doc_type, doc_uri)
+);
-CREATE INDEX source_idx ON xcap (source);
+CREATE INDEX xcap_source_idx ON xcap (source);
INSERT INTO version (table_name, table_version) values ('pua','6');
CREATE TABLE pua (
- id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ id SERIAL PRIMARY KEY NOT NULL,
pres_uri VARCHAR(128) NOT NULL,
pres_id VARCHAR(255) NOT NULL,
- event INT(11) NOT NULL,
- expires INT(11) NOT NULL,
- desired_expires INT(11) NOT NULL,
- flag INT(11) NOT NULL,
+ event INTEGER NOT NULL,
+ expires INTEGER NOT NULL,
+ desired_expires INTEGER NOT NULL,
+ flag INTEGER NOT NULL,
etag VARCHAR(64) NOT NULL,
tuple_id VARCHAR(64),
watcher_uri VARCHAR(128) NOT NULL,
call_id VARCHAR(128) NOT NULL,
to_tag VARCHAR(64) NOT NULL,
from_tag VARCHAR(64) NOT NULL,
- cseq INT(11) NOT NULL,
+ cseq INTEGER NOT NULL,
record_route TEXT,
contact VARCHAR(128) NOT NULL,
remote_contact VARCHAR(128) NOT NULL,
- version INT(11) NOT NULL,
+ version INTEGER NOT NULL,
extra_headers TEXT NOT NULL
-) ENGINE=MyISAM;
+);
Module: sip-router
Branch: master
Commit: 5cd87175faa97161023c37e2cc0f0c064e08d571
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5cd8717…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Jul 27 11:50:20 2011 +0100
core, srdb1, modules/db_*, modules_k/db_*: Added support for configuring SQL buffer size and mediumblob/mediumtext in MySQL
- Currently the SQL buffer size is hard-coded to 64k. This isn't
enough in some cases. For example, it is easily possible for
resource lists (which can be Network Address Books) to be larger
than 64k.
- The default buffer size is still 64k, but this can be overriden
with the new "sql_buffer_size" configuration option.
- Support added for mediumblob/mediumtext in MySQL as the blob/text
types that are currently supported are limited to 64k.
- Feature added by Andrew Miller at Crocodile RCS
---
cfg.lex | 2 +
cfg.y | 3 +
doc/cfg_list/docbook/cfg_core.xml | 12 +++
doc/stylesheets/dbschema_k/xsl/db_berkeley.xsl | 4 +-
doc/stylesheets/dbschema_k/xsl/db_sqlite.xsl | 6 +-
doc/stylesheets/dbschema_k/xsl/dbtext.xsl | 4 +-
doc/stylesheets/dbschema_k/xsl/mysql.xsl | 12 +++
doc/stylesheets/dbschema_k/xsl/oracle.xsl | 6 +-
doc/stylesheets/dbschema_k/xsl/postgres.xsl | 6 +-
globals.h | 1 +
lib/srdb1/db_query.c | 102 ++++++++++++++----------
lib/srdb1/db_query.h | 9 ++
lib/srdb1/db_ut.h | 5 -
main.c | 2 +
modules/db_berkeley/km_db_berkeley.c | 3 +-
modules/db_mysql/km_db_mysql.c | 2 +-
modules/db_mysql/km_dbase.c | 42 ++++++++---
modules/db_postgres/km_db_postgres.c | 3 +-
modules_k/db_oracle/db_oracle.c | 3 +-
modules_k/db_sqlite/db_sqlite.c | 2 +-
modules_k/db_unixodbc/db_unixodbc.c | 25 ++++--
21 files changed, 175 insertions(+), 79 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=5cd…
Hello,
I can't be more happier than seeing many of you adding new features to
master branch, however, this is a reminder to drop a short note about
the relevant enhancements in the wiki page:
http://sip-router.org/wiki/features/new-in-devel
The wiki is open for everyone -- no need to register, just fill the
captcha, or register and get rid of captcha. The wiki page is very
useful to build the release notes as well as to let people know what is
new during the development phase and get those interested in the new
additions to test them.
Thanks,
Daniel
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
Module: sip-router
Branch: pd/crocodile
Commit: d38e225fbb91128d127770126a42f47d21e238c2
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d38e225…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Fri Jul 29 11:56:14 2011 +0100
module_k/xcap_server: Added support HTTP 1.1 pre-conditions (If-Match: and If-None-Match:)
- Also fixed the ETag: header send by xcap_server as it should be a
quoted-string (RFC 2616 section 3.11 and 14.19).
- If-Match (RFC 2616 section 14.24) and If-None-Match (RFC 2616
section 14.26) are supported for the DELETE, GET, and PUT HTTP
requests.
This feature is useful as it enables clients to cache large XML
documents (user-profiles/avatars/resource-lists) and only have to
download them when they have actually changed (using If-None-Match:)
If-Match: can help with the race conditions present when you have
multiple simultaneous logins by helping to prevent clients from
overwriting changes made by other clients.
---
modules_k/xcap_server/Makefile | 1 +
modules_k/xcap_server/xcap_server.c | 277 +++++++++++++++++++++++++++++------
2 files changed, 234 insertions(+), 44 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=d38…
Module: sip-router
Branch: pd/crocodile
Commit: f0784ecd899eb486e39bce2973a07225ba5d9cf6
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f0784ec…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Fri Jul 29 11:44:56 2011 +0100
Merge branch 'master' into pd
* master:
core: fix all reported doxygen errors in PV and value evaluation code
tls: restrict visibility of 4 only internal used functions to the module
tls: two small code cleanups
tls: fix all doxygen errors, extend existing documentation in touched files
---
Module: sip-router
Branch: pd/crocodile
Commit: 5cd87175faa97161023c37e2cc0f0c064e08d571
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5cd8717…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Jul 27 11:50:20 2011 +0100
core, srdb1, modules/db_*, modules_k/db_*: Added support for configuring SQL buffer size and mediumblob/mediumtext in MySQL
- Currently the SQL buffer size is hard-coded to 64k. This isn't
enough in some cases. For example, it is easily possible for
resource lists (which can be Network Address Books) to be larger
than 64k.
- The default buffer size is still 64k, but this can be overriden
with the new "sql_buffer_size" configuration option.
- Support added for mediumblob/mediumtext in MySQL as the blob/text
types that are currently supported are limited to 64k.
- Feature added by Andrew Miller at Crocodile RCS
---
cfg.lex | 2 +
cfg.y | 3 +
doc/cfg_list/docbook/cfg_core.xml | 12 +++
doc/stylesheets/dbschema_k/xsl/db_berkeley.xsl | 4 +-
doc/stylesheets/dbschema_k/xsl/db_sqlite.xsl | 6 +-
doc/stylesheets/dbschema_k/xsl/dbtext.xsl | 4 +-
doc/stylesheets/dbschema_k/xsl/mysql.xsl | 12 +++
doc/stylesheets/dbschema_k/xsl/oracle.xsl | 6 +-
doc/stylesheets/dbschema_k/xsl/postgres.xsl | 6 +-
globals.h | 1 +
lib/srdb1/db_query.c | 102 ++++++++++++++----------
lib/srdb1/db_query.h | 9 ++
lib/srdb1/db_ut.h | 5 -
main.c | 2 +
modules/db_berkeley/km_db_berkeley.c | 3 +-
modules/db_mysql/km_db_mysql.c | 2 +-
modules/db_mysql/km_dbase.c | 42 ++++++++---
modules/db_postgres/km_db_postgres.c | 3 +-
modules_k/db_oracle/db_oracle.c | 3 +-
modules_k/db_sqlite/db_sqlite.c | 2 +-
modules_k/db_unixodbc/db_unixodbc.c | 25 ++++--
21 files changed, 175 insertions(+), 79 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=5cd…
Module: sip-router
Branch: 3.1
Commit: 505e4b790578e2cfe372ae318fab967b71cd265c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=505e4b7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Jul 28 13:18:11 2011 +0200
textops(k): internal API bind function exported via module interface
- internal API was defined but no function to bind it was available in
the module interface, reported by Timo Klecker
- rename of functions and typedef'ed struct to match the patterns of
exporting modules internal API
(cherry picked from commit db188fbcf4d752a2afab2e298a2f081f836d7e92)
---
modules_k/textops/api.c | 2 +-
modules_k/textops/api.h | 18 +++++++++---------
modules_k/textops/textops.c | 3 +++
3 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/modules_k/textops/api.c b/modules_k/textops/api.c
index aad62e1..3180d09 100644
--- a/modules_k/textops/api.c
+++ b/modules_k/textops/api.c
@@ -103,7 +103,7 @@ int search_api(struct sip_msg *msg, str *regex){
/*
* Function to load the textops api.
*/
-int load_textops(struct textops_binds *tob){
+int bind_textops(textops_api_t *tob){
if(tob==NULL){
LM_WARN("textops_binds: Cannot load textops API into a NULL pointer\n");
return -1;
diff --git a/modules_k/textops/api.h b/modules_k/textops/api.h
index fbad481..a2b72c4 100644
--- a/modules_k/textops/api.h
+++ b/modules_k/textops/api.h
@@ -37,31 +37,31 @@ typedef int (*search_t)(struct sip_msg*, str*);
/*
* Struct with the textops api.
*/
-struct textops_binds{
+typedef struct textops_binds {
append_hf_t append_hf; // Append a header to the message.
remove_hf_t remove_hf; // Remove a header with the specified name from the message.
search_append_t search_append; // Append a str after a match of the specified regex.
search_t search; // Check if the regex matches a part of the message.
-};
+} textops_api_t;
-typedef int (*load_textops_f)(struct textops_binds*);
+typedef int (*bind_textops_f)(textops_api_t*);
/*
* function exported by module - it will load the other functions
*/
-int load_textops(struct textops_binds*);
+int bind_textops(textops_api_t*);
/*
* Function to be called direclty from other modules to load
* the textops API.
*/
-inline static int load_textops_api(struct textops_binds *tob){
- load_textops_f load_textops_exports;
- if(!(load_textops_exports=(load_textops_f)find_export("load_textops",0,0))){
- LM_ERR("Failed to import load_textops\n");
+inline static int load_textops_api(textops_api_t *tob){
+ bind_textops_f bind_textops_exports;
+ if(!(bind_textops_exports=(bind_textops_f)find_export("bind_textops",0,0))){
+ LM_ERR("Failed to import bind_textops\n");
return -1;
}
- return load_textops_exports(tob);
+ return bind_textops_exports(tob);
}
#endif /*TEXT_OPS_API_H_*/
diff --git a/modules_k/textops/textops.c b/modules_k/textops/textops.c
index cb3907d..9198f77 100644
--- a/modules_k/textops/textops.c
+++ b/modules_k/textops/textops.c
@@ -247,6 +247,9 @@ static cmd_export_t cmds[]={
fixup_spve_spve, 0,
REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},
+ {"bind_textops", (cmd_function)bind_textops, 0, 0, 0,
+ 0},
+
{0,0,0,0,0,0}
};