]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
revert some useless differences from the official sofia-sip tree
authorMichael Jerris <mike@jerris.com>
Thu, 15 Feb 2007 02:53:37 +0000 (02:53 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 15 Feb 2007 02:53:37 +0000 (02:53 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4281 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c

index 5f39cf4a44e8ecb6addf4132ceb889cf238bcd5d..d5c09cae98e1b17565faedb783e1ac29e086d27c 100644 (file)
@@ -2043,20 +2043,8 @@ int nua_invite_server_report(nua_server_request_t *sr, tagi_t const *tags)
   }
 
   assert(ss);
-#if 1
   assert(ss->ss_state != nua_callstate_calling);
   assert(ss->ss_state != nua_callstate_proceeding);
-#else
-//  assert(ss->ss_state != nua_callstate_calling);
-//  assert(ss->ss_state != nua_callstate_proceeding);
-  if(ss->ss_state == nua_callstate_calling || ss->ss_state != nua_callstate_proceeding) {
-         /* somthing is badly wrong here.  Lets kill it gracefully for now */
-               sr_status(sr, SIP_500_INTERNAL_SERVER_ERROR);
-        signal_call_state_change(nh, NULL, status, phrase,
-                              nua_callstate_terminated);
-               return retval;
-  }
-#endif
 
   /* Update session state */
   if (status < 300 || application != 0)
@@ -2214,7 +2202,7 @@ int process_cancel(nua_server_request_t *sr,
          ss && (ss == nua_session_usage_get(nh->nh_ds))) {
     nua_stack_event(nh->nh_nua, nh, cancel, nua_i_cancel, SIP_200_OK, NULL);
 
-    SR_STATUS1(sr, SIP_487_REQUEST_TERMINATED);
+  SR_STATUS1(sr, SIP_487_REQUEST_TERMINATED);
 
     nua_server_respond(sr, NULL);
     nua_server_report(sr);
index aff456dbdb3c3630024f4face3f0b60e4d8b3f1f..69d508c0f2321a6ad7a872805e6b9fe0c84888ab 100644 (file)
@@ -930,10 +930,8 @@ sres_query(sres_resolver_t *res,
   SU_DEBUG_9(("sres_query(%p, %p, %s, \"%s\") called\n",
                          (void *)res, (void *)context, sres_record_type(type, b), domain));
 
-  if (res == NULL || domain == NULL) {
-    su_seterrno(EFAULT);
-       return NULL;
-  }
+  if (res == NULL || domain == NULL)
+    return su_seterrno(EFAULT), (void *)NULL;
 
   dlen = strlen(domain);
   if (dlen > SRES_MAXDNAME ||
@@ -945,10 +943,8 @@ sres_query(sres_resolver_t *res,
   /* Reread resolv.conf if needed */
   sres_resolver_update(res, 0);
 
-  if (res->res_n_servers == 0) {
-    su_seterrno(ENETDOWN);
-       return NULL;
-  }
+  if (res->res_n_servers == 0)
+    return (void)su_seterrno(ENETDOWN), (sres_query_t *)NULL;
 
   query = sres_query_alloc(res, callback, context, type, domain);