Module: sems Branch: rco/offer_answer Commit: f98b68419f21f47570af7799547de1d981fbdd2f URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=f98b68419f21f47570af7799547de1d981fbdd2f
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Sat Apr 9 12:07:40 2011 +0200 b/f: merge fixes --- apps/jsonrpc/JsonRPCEvents.h | 2 +- apps/jsonrpc/RpcPeer.cpp | 2 +- core/AmSipDialog.cpp | 26 ++++++-------------------- core/AmSipDialog.h | 2 +- 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/apps/jsonrpc/JsonRPCEvents.h b/apps/jsonrpc/JsonRPCEvents.h index 172050f..ea03368 100644 --- a/apps/jsonrpc/JsonRPCEvents.h +++ b/apps/jsonrpc/JsonRPCEvents.h @@ -39,7 +39,7 @@ using std::string; #define JSONRPC_MSG_REQUEST 0 #define JSONRPC_MSG_RESPONSE 1 #define JSONRPC_MSG_ERROR 2 -class JsonrpcNetstringsConnection; +struct JsonrpcNetstringsConnection; struct JsonRpcEvent : public AmEvent { diff --git a/apps/jsonrpc/RpcPeer.cpp b/apps/jsonrpc/RpcPeer.cpp index 22720bb..16d6ecd 100644 --- a/apps/jsonrpc/RpcPeer.cpp +++ b/apps/jsonrpc/RpcPeer.cpp @@ -311,7 +311,7 @@ int JsonrpcNetstringsConnection::netstringsBlockingWrite() { rcvd_size = 0; size_t ns_total_len = msg_size+msg_size_s.length()+2; while (rcvd_size != ns_total_len) { - size_t written = send(fd, &ns_begin[rcvd_size], ns_total_len - rcvd_size, MSG_NOSIGNAL); + size_t written = send(fd, &ns_begin[rcvd_size], ns_total_len - rcvd_size, 0); if ((written<0 && (errno==EAGAIN || errno==EWOULDBLOCK)) || written==0) { usleep(SEND_SLEEP); diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp index aa6f050..4bab7b4 100644 --- a/core/AmSipDialog.cpp +++ b/core/AmSipDialog.cpp @@ -54,22 +54,6 @@ const char* dlgStatusStr(AmSipDialog::Status st) return __dlg_status2str[st]; } -static inline string get_100rel_hdr(unsigned char reliable_1xx) -{ - switch(reliable_1xx) { - case AmSipDialog::REL100_SUPPORTED: - return SIP_HDR_COLSP(SIP_HDR_SUPPORTED) SIP_EXT_100REL CRLF; - case AmSipDialog::REL100_REQUIRE: - return SIP_HDR_COLSP(SIP_HDR_REQUIRE) SIP_EXT_100REL CRLF; - default: - ERROR("BUG: unexpected reliability switch value of '%d'.\n", - reliable_1xx); - case 0: - break; - } - return ""; -} - const char* AmSipDialog::getStatusStr() { return dlgStatusStr(status); @@ -713,9 +697,11 @@ void AmSipDialog::onRxReply(const AmSipReply& reply) } break; - case 0: + case REL100_IGNORED: + case REL100_DISABLED: // 100rel support disabled break; + default: ERROR("BUG: unexpected value `%d' for " SIP_EXT_100REL " switch.", reliable_1xx); @@ -1343,9 +1329,9 @@ int AmSipDialog::sendRequest(const string& method, if(!m_hdrs.empty()) req.hdrs = m_hdrs; - if((method == "INVITE") && reliable_1xx){ - req.hdrs += get_100rel_hdr(reliable_1xx); - } + // if((method == "INVITE") && reliable_1xx){ + // req.hdrs += get_100rel_hdr(reliable_1xx); + // } if (!(flags&SIP_FLAGS_VERBATIM)) { // add Signature diff --git a/core/AmSipDialog.h b/core/AmSipDialog.h index e0684cf..d0bb9ba 100644 --- a/core/AmSipDialog.h +++ b/core/AmSipDialog.h @@ -93,7 +93,7 @@ class AmSipDialog /** enable the reliability of provisional replies? */ enum Rel100State { - REL100_DISABLED, + REL100_DISABLED=0, #define REL100_DISABLED AmSipDialog::REL100_DISABLED REL100_SUPPORTED, #define REL100_SUPPORTED AmSipDialog::REL100_SUPPORTED _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
