added 'star' as special word for the contact option -C

git-svn-id: http://svn.berlios.de/svnroot/repos/sipsak/trunk@426 75b5f7c7-cfd4-0310-b54c-e118b2c5249a
(cherry picked from commit 3860d1a03ef2d9840487969994fa3a68ff4d9d85)
(cherry picked from commit 1e0ea08deb)
mr3.8.5
nils-ohlmeier 19 years ago committed by Victor Seva
parent 1bf0540dd3
commit 19e80e2d2c

@ -175,6 +175,12 @@ or
.B none
will result in no contact header in the REGISTER request and thus the server
should answer with the current bindings for the account at the registrar.
The special words
.B *
or
.B star
will result in Contact header containing just a star, e.g. to remove all
bindings by using expires value 0 together with this Contact.
.IP "-d, --ignore-redirects"
If this option is set all redirects will be ignored. By default without this

@ -393,7 +393,8 @@ int main(int argc, char *argv[])
(strlen(optarg) == 4 && STRNCASECMP(optarg, "none", 4) == 0)) {
empty_contact = 1;
}
else if (strlen(optarg) == 1 && STRNCASECMP(optarg, "*", 1) == 0) {
else if ((strlen(optarg) == 1 && STRNCASECMP(optarg, "*", 1) == 0) ||
(strlen(optarg) == 4 && STRNCASECMP(optarg, "star", 4) == 0)) {
contact_uri=str_alloc(strlen(optarg)+1);
strncpy(contact_uri, optarg, strlen(optarg));
}

Loading…
Cancel
Save