]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Avoid -Wunused-value warning
authorTravis Cross <tc@traviscross.com>
Mon, 25 Jun 2012 06:20:16 +0000 (06:20 +0000)
committerTravis Cross <tc@traviscross.com>
Mon, 25 Jun 2012 06:41:00 +0000 (06:41 +0000)
Don't use the SET_STATUS1 macro as it will always produce this
warning.  It's a rather 'interesting' macro that's probably best
avoided anyway.

libs/sofia-sip/libsofia-sip-ua/nua/nua_event_server.c
libs/sofia-sip/libsofia-sip-ua/nua/nua_publish.c

index 96a8059c21f3335dbcfe5cd8879c6765b75fbbed..0ddecd95f3ec36f0fe0c490b29335d1323259e74 100644 (file)
@@ -199,7 +199,7 @@ void authorize_watcher(nea_server_t *nes,
   int substate = sn->sn_state;
   int status; char const *phrase;
 
-  SET_STATUS1(SIP_200_OK);
+  SET_STATUS(200, sip_200_OK);
 
   /* OK. In nhp (nua_handle_preferences_t) structure we have the
      current default action (or state) for incoming
@@ -218,10 +218,10 @@ void authorize_watcher(nea_server_t *nes,
       substate = nua_substate_pending;
 
     if (substate == nua_substate_terminated) {
-      what = "rejected"; SET_STATUS1(SIP_403_FORBIDDEN);
+      what = "rejected"; SET_STATUS(403, sip_403_Forbidden);
     }
     else if (substate == nua_substate_pending) {
-      what = "pending"; SET_STATUS1(SIP_202_ACCEPTED);
+      what = "pending"; SET_STATUS(202, sip_202_Accepted);
     }
     else {
       what = "active";
index dbe588cc8eeaf9bdd838f889c5581bd9786906b8..2a55c345a7681d290313a47d7a0183d74e3f3169 100644 (file)
@@ -413,7 +413,7 @@ static int nua_publish_client_response(nua_client_request_t *cr,
        if (!ex || ex->ex_delta == 0)
          SET_STATUS(900, "Received Invalid Expiration Time");
        else
-         SET_STATUS1(NUA_ERROR_AT(__FILE__, __LINE__));
+         SET_STATUS(900, _NUA_INTERNAL_ERROR_AT(__FILE__, __LINE__));
       }
       else
        nua_dialog_usage_set_refresh(du, ex->ex_delta);