aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-02 21:53:39 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-02 21:53:39 +0000
commiteae2f2ddaf1d2f597d2f4c2ee4a341376132b0c0 (patch)
tree1fc54ed51183f9037a2f0fd55f0ee57ce2c89229
parent4066a3e69c16d5809b0a32f427c0f4cff8806463 (diff)
Make sure we actually allow 6 chars to be sent.
Also make note of the "A" option of date format. Issue 9779, modifications by DEA, wedhorn, and myself. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77996 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_skinny.c4
-rw-r--r--configs/skinny.conf.sample4
2 files changed, 5 insertions, 3 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 64c306f27..2bde2e2d8 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -2991,7 +2991,7 @@ static int handle_register_message(struct skinny_req *req, struct skinnysession
req->data.regack.res[0] = '0';
req->data.regack.res[1] = '\0';
req->data.regack.keepAlive = htolel(keep_alive);
- ast_copy_string(req->data.regack.dateTemplate, date_format, sizeof(req->data.regack.dateTemplate));
+ memcpy(req->data.regack.dateTemplate, date_format, sizeof(req->data.regack.dateTemplate));
req->data.regack.res2[0] = '0';
req->data.regack.res2[1] = '\0';
req->data.regack.secondaryKeepAlive = htolel(keep_alive);
@@ -4667,7 +4667,7 @@ static int reload_config(void)
} else if (!strcasecmp(v->name, "keepalive")) {
keep_alive = atoi(v->value);
} else if (!strcasecmp(v->name, "dateformat")) {
- ast_copy_string(date_format, v->value, sizeof(date_format));
+ memcpy(date_format, v->value, sizeof(date_format));
} else if (!strcasecmp(v->name, "allow")) {
ast_parse_allow_disallow(&default_prefs, &default_capability, v->value, 1);
} else if (!strcasecmp(v->name, "disallow")) {
diff --git a/configs/skinny.conf.sample b/configs/skinny.conf.sample
index 995012083..1ed7c4ffd 100644
--- a/configs/skinny.conf.sample
+++ b/configs/skinny.conf.sample
@@ -4,7 +4,9 @@
[general]
bindaddr=0.0.0.0 ; Address to bind to
bindport=2000 ; Port to bind to, default tcp/2000
-dateformat=M-D-Y ; M,D,Y in any order (5 chars max)
+dateformat=M-D-Y ; M,D,Y in any order (6 chars max)
+ ; "A" may also be used, but it must be at the end.
+ ; Use M for month, D for day, Y for year, A for 12-hour time.
keepalive=120
;allow=all ; see doc/rtp-packetization for framing options