]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freq 0 means dont reg
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 30 Sep 2006 01:26:54 +0000 (01:26 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 30 Sep 2006 01:26:54 +0000 (01:26 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2879 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index 7ebe3f5dc2f26da975c67260d741b7294c8dda16..2f2802778a28a76165c7c448e9ad909a0469442a 100644 (file)
@@ -2753,7 +2753,7 @@ static switch_status_t config_sofia(int reload)
                                                        oreg->pool = profile->pool;
                                                        oreg->profile = profile;
                                                        oreg->name = switch_core_strdup(oreg->pool, name);
-                                                       oreg->freq = 60;
+                                                       oreg->freq = 0;
 
                                                        for (param = switch_xml_child(registration, "param"); param; param = param->next) {
                                                                char *var = (char *) switch_xml_attr_soft(param, "name");
@@ -2805,7 +2805,9 @@ static switch_status_t config_sofia(int reload)
                                                        }
 
                                                        oreg->freq = atoi(oreg->expires_str);
-
+                                                       if (!oreg->freq) {
+                                                               oreg->state = REG_STATE_REGED;
+                                                       }
                                                        oreg->next = profile->registrations;
                                                        profile->registrations = oreg;
                                                }