1 Index: twinkle-1.4.2/configure.in
2 ===================================================================
3 --- twinkle-1.4.2.orig/configure.in 2009-02-24 20:49:20.000000000 +0100
4 +++ twinkle-1.4.2/configure.in 2011-09-27 12:33:39.787913055 +0200
5 @@ -47,7 +47,7 @@ AC_CHECK_HEADERS([linux/errqueue.h],[],[
7 # Check version of the Common C++ library.
8 # This also sets the cc++2 include directory in CXXFLAGS
9 -OST_CCXX2_VERSION(1.6.0,,exit)
10 +#OST_CCXX2_VERSION(1.6.0,,exit)
12 # Temporarily add some default directories to PKG_CONFIG_PATH such that
13 # the user will not be burdened with setting PKG_CONFIG_PATH
16 export PKG_CONFIG_PATH
18 -PKG_CHECK_MODULES(CCRTP, libccrtp1 >= 1.6.0)
19 +PKG_CHECK_MODULES(CCRTP, libccrtp >= 2.0.0)
20 +PKG_CHECK_MODULES(UCOMMON, ucommon >= 5.0.0)
21 +CCRTP_LIBS="$CCRTP_LIBS $UCOMMON_LIBS"
23 PKG_CHECK_MODULES(XML2, libxml-2.0)
24 # AC_CHECK_HEADER(libxml/tree.h, [],
25 @@ -136,7 +138,7 @@ done
26 #echo "INCLUDEPATH += `$CCGNU2_CONFIG --includes`" | sed -e s/-I//g > $QT_INCL_PRO
27 # libccrtp1(ccrtp) depend from libccgnu2(commoncpp2) and
28 # should include above flags !
29 -echo "INCLUDEPATH += `$PKG_CONFIG --cflags-only-I libccrtp1`" | sed -e s/-I//g >> $QT_INCL_PRO
30 +echo "INCLUDEPATH += `$PKG_CONFIG --cflags-only-I libccrtp`" | sed -e s/-I//g >> $QT_INCL_PRO
31 echo "INCLUDEPATH += `$PKG_CONFIG --cflags-only-I libxml-2.0`" | sed -e s/-I//g >> $QT_INCL_PRO
33 # get libraries specified on command line
34 @@ -144,6 +146,7 @@ echo $LDFLAGS | xargs echo LIBS += >> $Q
36 echo "LIBS += `$CCGNU2_CONFIG --stdlibs`" >> $QT_INCL_PRO
37 echo "LIBS += $CCRTP_LIBS" >> $QT_INCL_PRO
38 +echo "LIBS += $UCOMMON_LIBS" >> $QT_INCL_PRO
39 echo "LIBS += $XML2_LIBS" >> $QT_INCL_PRO
41 # Check if KDE is available
42 @@ -264,7 +267,7 @@ fi
43 # Check if zrtp is available
44 if test "x$ac_cv_zrtp" = "xyes"
46 - PKG_CHECK_MODULES(ZRTP, libzrtpcpp >= 1.3.0)
47 + PKG_CHECK_MODULES(ZRTP, libzrtpcpp >= 2.0.0)
48 AC_CHECK_LIB(zrtpcpp, main, [
49 AC_CHECK_HEADER(libzrtpcpp/ZrtpQueue.h, [],
50 [AC_MSG_ERROR([zrtp header files missing])])
51 Index: twinkle-1.4.2/src/audio/audio_decoder.h
52 ===================================================================
53 --- twinkle-1.4.2.orig/src/audio/audio_decoder.h 2009-01-03 17:53:58.000000000 +0100
54 +++ twinkle-1.4.2/src/audio/audio_decoder.h 2011-09-27 12:33:39.790913085 +0200
56 #ifndef _AUDIO_DECODER_H
57 #define _AUDIO_DECODER_H
59 -#include <cc++/config.h>
60 #include "twinkle_config.h"
61 #include "audio_codecs.h"
63 Index: twinkle-1.4.2/src/audio/audio_encoder.h
64 ===================================================================
65 --- twinkle-1.4.2.orig/src/audio/audio_encoder.h 2009-01-03 17:53:58.000000000 +0100
66 +++ twinkle-1.4.2/src/audio/audio_encoder.h 2011-09-27 12:33:39.790913085 +0200
68 #ifndef _AUDIO_ENCODER_H
69 #define _AUDIO_ENCODER_H
71 -#include <cc++/config.h>
72 #include "twinkle_config.h"
73 #include "audio_codecs.h"
75 Index: twinkle-1.4.2/src/audio/audio_rx.cpp
76 ===================================================================
77 --- twinkle-1.4.2.orig/src/audio/audio_rx.cpp 2009-01-31 13:05:53.000000000 +0100
78 +++ twinkle-1.4.2/src/audio/audio_rx.cpp 2011-09-27 12:33:39.791913095 +0200
81 #include <sys/types.h>
83 -#include <cc++/config.h>
87 Index: twinkle-1.4.2/src/audio/dtmf_player.h
88 ===================================================================
89 --- twinkle-1.4.2.orig/src/audio/dtmf_player.h 2009-01-03 17:53:58.000000000 +0100
90 +++ twinkle-1.4.2/src/audio/dtmf_player.h 2011-09-27 12:33:39.791913095 +0200
92 #ifndef _DTMF_PLAYER_H
93 #define _DTMF_PLAYER_H
95 -#include <cc++/config.h>
96 #include "twinkle_config.h"
97 #include "audio_encoder.h"
99 Index: twinkle-1.4.2/src/audio/freq_gen.h
100 ===================================================================
101 --- twinkle-1.4.2.orig/src/audio/freq_gen.h 2009-01-03 17:53:58.000000000 +0100
102 +++ twinkle-1.4.2/src/audio/freq_gen.h 2011-09-27 12:33:39.791913095 +0200
107 -#include <cc++/config.h>
108 +#include <commoncpp/config.h>
112 Index: twinkle-1.4.2/src/audio/tone_gen.h
113 ===================================================================
114 --- twinkle-1.4.2.orig/src/audio/tone_gen.h 2009-01-03 17:53:58.000000000 +0100
115 +++ twinkle-1.4.2/src/audio/tone_gen.h 2011-09-27 12:33:39.792913104 +0200
120 -#include <cc++/config.h>
122 #include "sys_settings.h"
123 #include "threads/mutex.h"
124 Index: twinkle-1.4.2/src/call_script.h
125 ===================================================================
126 --- twinkle-1.4.2.orig/src/call_script.h 2009-01-03 17:54:01.000000000 +0100
127 +++ twinkle-1.4.2/src/call_script.h 2011-09-27 12:33:39.792913104 +0200
132 -#include <cc++/config.h>
134 #include "parser/request.h"
136 Index: twinkle-1.4.2/src/log.cpp
137 ===================================================================
138 --- twinkle-1.4.2.orig/src/log.cpp 2009-01-18 15:35:28.000000000 +0100
139 +++ twinkle-1.4.2/src/log.cpp 2011-09-27 12:33:39.792913104 +0200
140 @@ -40,6 +40,7 @@ void *main_logview(void *arg) {
141 // TODO: handle situation where log file was zapped.
142 if (ui) ui->cb_log_updated(false);
147 bool t_log::move_current_to_old(void) {
148 @@ -161,7 +162,7 @@ void t_log::write_header(const string &f
150 gettimeofday(&t, NULL);
152 - localtime_r(&date, &tm);
153 + ::localtime_r(&date, &tm);
155 *log_stream << "+++ ";
156 *log_stream << tm.tm_mday;
157 Index: twinkle-1.4.2/src/mwi/mwi_dialog.cpp
158 ===================================================================
159 --- twinkle-1.4.2.orig/src/mwi/mwi_dialog.cpp 2009-01-03 17:54:03.000000000 +0100
160 +++ twinkle-1.4.2/src/mwi/mwi_dialog.cpp 2011-09-27 12:33:39.793913113 +0200
161 @@ -32,4 +32,5 @@ t_mwi_dialog::t_mwi_dialog(t_phone_user
162 t_mwi_dialog *t_mwi_dialog::copy(void) {
163 // Copy is not needed.
167 Index: twinkle-1.4.2/src/mwi/simple_msg_sum_body.h
168 ===================================================================
169 --- twinkle-1.4.2.orig/src/mwi/simple_msg_sum_body.h 2009-01-03 17:53:57.000000000 +0100
170 +++ twinkle-1.4.2/src/mwi/simple_msg_sum_body.h 2011-09-27 12:33:39.793913113 +0200
175 -#include <cc++/config.h>
176 #include "parser/sip_body.h"
177 #include "sockets/url.h"
179 Index: twinkle-1.4.2/src/parser/definitions.cpp
180 ===================================================================
181 --- twinkle-1.4.2.orig/src/parser/definitions.cpp 2009-01-03 17:54:07.000000000 +0100
182 +++ twinkle-1.4.2/src/parser/definitions.cpp 2011-09-27 12:33:39.793913113 +0200
183 @@ -38,6 +38,7 @@ string method2str(const t_method &m, con
184 case METHOD_UNKNOWN: return unknown;
185 default: assert(false);
190 t_method str2method(const string &s) {
191 Index: twinkle-1.4.2/src/parser/request.cpp
192 ===================================================================
193 --- twinkle-1.4.2.orig/src/parser/request.cpp 2009-01-18 15:06:11.000000000 +0100
194 +++ twinkle-1.4.2/src/parser/request.cpp 2011-09-27 12:33:39.794913123 +0200
196 #include "milenage.h"
197 #include "audits/memman.h"
199 -#include <cc++/digest.h>
200 +#include <ucommon/secure.h>
202 -using namespace ost;
203 +using namespace UCOMMON_NAMESPACE;
205 +// using namespace ost;
207 // AKAv1-MD5 algorithm specific helpers
209 @@ -148,10 +150,10 @@ int b64_dec(const u8 * src, u8 * dst, in
210 // authentication with AKAv1-MD5 algorithm (RFC 3310)
212 bool t_request::authorize_akav1_md5(const t_digest_challenge &dchlg,
213 - const string &username, const string &passwd, uint8 *op, uint8 *amf,
214 + const std::string &username, const std::string &passwd, uint8 *op, uint8 *amf,
216 - const string &cnonce, const string &qop, string &resp,
217 - string &fail_reason) const
218 + const std::string &cnonce, const std::string &qop, std::string &resp,
219 + std::string &fail_reason) const
221 u8 nonce64[B64_DEC_SZ(dchlg.nonce.size())];
222 int len = b64_dec((const u8 *)dchlg.nonce.c_str(), nonce64, dchlg.nonce.size());
223 @@ -183,7 +185,7 @@ bool t_request::authorize_akav1_md5(cons
224 for (i=0; i < AKA_SQNLEN; i++)
225 sqn[i] = sqnxoraka[i] ^ ak[i];
227 - string res_str = string((char *)res, AKA_RESLEN);
228 + std::string res_str = std::string((char *)res, AKA_RESLEN);
230 return authorize_md5(dchlg, username, res_str, nc, cnonce, qop,
232 @@ -192,11 +194,11 @@ bool t_request::authorize_akav1_md5(cons
233 // authentication with MD5 algorithm
235 bool t_request::authorize_md5(const t_digest_challenge &dchlg,
236 - const string &username, const string &passwd, unsigned long nc,
237 - const string &cnonce, const string &qop, string &resp,
238 - string &fail_reason) const
239 + const std::string &username, const std::string &passwd, unsigned long nc,
240 + const std::string &cnonce, const std::string &qop, std::string &resp,
241 + std::string &fail_reason) const
244 + std::string A1, A2;
246 A1 = username + ":" + dchlg.realm + ":" + passwd;
248 @@ -207,60 +209,51 @@ bool t_request::authorize_md5(const t_di
249 A2 = method2str(method, unknown_method) + ":" + uri.encode();
253 - MD5body << body->encode();
257 + digest_t MD5body = "md5";
258 + MD5body.puts(body->encode().c_str());
259 + A2 += std::string(MD5body.c_str());
266 + digest_t MD5body = "md5";
268 + A2 += std::string(MD5body.c_str());
283 + digest_t MD5A1 = "md5";
284 + digest_t MD5A2 = "md5";
286 + MD5A1.puts(A1.c_str());
287 + MD5A2.puts(A2.c_str());
292 if (cmp_nocase(qop, QOP_AUTH) == 0 || cmp_nocase(qop, QOP_AUTH_INT) == 0) {
293 - x = HA1.str() + ":";
294 + x = std::string(MD5A1.c_str());
296 x += dchlg.nonce + ":";
297 x += int2str(nc, "%08x") + ":";
301 + x += std::string(MD5A2.c_str());
303 - x = HA1.str() + ":";
304 + x = std::string(MD5A1.c_str());
306 x += dchlg.nonce + ":";
308 + x += std::string(MD5A2.c_str());
313 - ostringstream dresp;
315 + digest_t digest = "md5";
316 + digest.puts(x.c_str());
318 - resp = dresp.str();
319 + resp = std::string(digest.c_str());
324 bool t_request::authorize(const t_challenge &chlg, t_user *user_config,
325 - const string &username, const string &passwd, unsigned long nc,
326 - const string &cnonce, t_credentials &cr, string &fail_reason) const
327 + const std::string &username, const std::string &passwd, unsigned long nc,
328 + const std::string &cnonce, t_credentials &cr, std::string &fail_reason) const
330 // Only Digest authentication is supported
331 if (cmp_nocase(chlg.auth_scheme, AUTH_DIGEST) != 0) {
332 @@ -271,17 +264,17 @@ bool t_request::authorize(const t_challe
334 const t_digest_challenge &dchlg = chlg.digest_challenge;
337 + std::string qop = "";
340 // If both auth and auth-int are supported by the server, then
341 // choose auth to avoid problems with SIP ALGs. A SIP ALG rewrites
342 // the body of a message, thereby breaking auth-int authentication.
343 if (!dchlg.qop_options.empty()) {
344 - const list<string>::const_iterator i = find(
345 + const list<std::string>::const_iterator i = find(
346 dchlg.qop_options.begin(), dchlg.qop_options.end(),
348 - const list<string>::const_iterator j = find(
349 + const list<std::string>::const_iterator j = find(
350 dchlg.qop_options.begin(), dchlg.qop_options.end(),
352 if (j != dchlg.qop_options.end())
353 @@ -297,7 +290,7 @@ bool t_request::authorize(const t_challe
360 if (cmp_nocase(dchlg.algorithm, ALG_MD5) == 0) {
361 ret = authorize_md5(dchlg, username, passwd, nc, cnonce,
362 @@ -359,15 +352,15 @@ t_request::t_request(const t_method m) :
366 -void t_request::set_method(const string &s) {
367 +void t_request::set_method(const std::string &s) {
368 method = str2method(s);
369 if (method == METHOD_UNKNOWN) {
374 -string t_request::encode(bool add_content_length) {
376 +std::string t_request::encode(bool add_content_length) {
379 s = method2str(method, unknown_method) + ' ' + uri.encode();
381 @@ -377,9 +370,9 @@ string t_request::encode(bool add_conten
385 -list<string> t_request::encode_env(void) {
387 - list<string> l = t_sip_message::encode_env();
388 +list<std::string> t_request::encode_env(void) {
390 + list<std::string> l = t_sip_message::encode_env();
392 s = "SIPREQUEST_METHOD=";
393 s += method2str(method, unknown_method);
394 @@ -431,7 +424,7 @@ void t_request::set_route(const t_url &t
398 -t_response *t_request::create_response(int code, string reason) const
399 +t_response *t_request::create_response(int code, std::string reason) const
403 @@ -458,7 +451,7 @@ t_response *t_request::create_response(i
407 -bool t_request::is_valid(bool &fatal, string &reason) const {
408 +bool t_request::is_valid(bool &fatal, std::string &reason) const {
409 if (!t_sip_message::is_valid(fatal, reason)) return false;
412 @@ -702,8 +695,8 @@ void t_request::set_destination(const t_
415 bool t_request::www_authorize(const t_challenge &chlg, t_user *user_config,
416 - const string &username, const string &passwd, unsigned long nc,
417 - const string &cnonce, t_credentials &cr, string &fail_reason)
418 + const std::string &username, const std::string &passwd, unsigned long nc,
419 + const std::string &cnonce, t_credentials &cr, std::string &fail_reason)
421 if (!authorize(chlg, user_config, username, passwd, nc, cnonce, cr, fail_reason)) {
423 @@ -715,8 +708,8 @@ bool t_request::www_authorize(const t_ch
426 bool t_request::proxy_authorize(const t_challenge &chlg, t_user *user_config,
427 - const string &username, const string &passwd, unsigned long nc,
428 - const string &cnonce, t_credentials &cr, string &fail_reason)
429 + const std::string &username, const std::string &passwd, unsigned long nc,
430 + const std::string &cnonce, t_credentials &cr, std::string &fail_reason)
432 if (!authorize(chlg, user_config, username, passwd, nc, cnonce, cr, fail_reason)) {
434 Index: twinkle-1.4.2/src/parser/sip_body.h
435 ===================================================================
436 --- twinkle-1.4.2.orig/src/parser/sip_body.h 2009-01-03 17:54:00.000000000 +0100
437 +++ twinkle-1.4.2/src/parser/sip_body.h 2011-09-27 12:33:39.794913123 +0200
442 -#include <cc++/config.h>
443 +#include <commoncpp/config.h>
445 #include <libxml/tree.h>
447 Index: twinkle-1.4.2/src/presence/presence_dialog.cpp
448 ===================================================================
449 --- twinkle-1.4.2.orig/src/presence/presence_dialog.cpp 2009-01-03 17:54:07.000000000 +0100
450 +++ twinkle-1.4.2/src/presence/presence_dialog.cpp 2011-09-27 12:33:39.849913648 +0200
451 @@ -32,4 +32,5 @@ t_presence_dialog::t_presence_dialog(t_p
452 t_presence_dialog *t_presence_dialog::copy(void) {
453 // Copy is not needed.
457 Index: twinkle-1.4.2/src/sdp/sdp.cpp
458 ===================================================================
459 --- twinkle-1.4.2.orig/src/sdp/sdp.cpp 2009-01-03 17:54:03.000000000 +0100
460 +++ twinkle-1.4.2/src/sdp/sdp.cpp 2011-09-27 12:33:39.850913659 +0200
461 @@ -37,6 +37,7 @@ string sdp_ntwk_type2str(t_sdp_ntwk_type
468 t_sdp_ntwk_type str2sdp_ntwk_type(string s) {
469 @@ -53,6 +54,7 @@ string sdp_addr_type2str(t_sdp_addr_type
476 t_sdp_addr_type str2sdp_addr_type(string s) {
477 @@ -69,6 +71,7 @@ string sdp_transport2str(t_sdp_transport
484 t_sdp_transport str2sdp_transport(string s) {
485 @@ -92,6 +95,7 @@ string sdp_media_type2str(t_sdp_media_ty
492 string get_rtpmap(unsigned format, t_audio_codec codec) {
493 @@ -153,6 +157,7 @@ string sdp_media_direction2str(t_sdp_med
500 ///////////////////////////////////
501 Index: twinkle-1.4.2/src/sequence_number.h
502 ===================================================================
503 --- twinkle-1.4.2.orig/src/sequence_number.h 2009-01-03 17:53:58.000000000 +0100
504 +++ twinkle-1.4.2/src/sequence_number.h 2011-09-27 12:33:39.850913659 +0200
506 #ifndef _SEQUENCE_NUMBER_H
507 #define _SEQUENCE_NUMBER_H
509 -#include <cc++/config.h>
513 Index: twinkle-1.4.2/src/sys_settings.cpp
514 ===================================================================
515 --- twinkle-1.4.2.orig/src/sys_settings.cpp 2009-02-11 22:46:13.000000000 +0100
516 +++ twinkle-1.4.2/src/sys_settings.cpp 2011-09-27 12:33:39.851913671 +0200
517 @@ -1064,7 +1064,7 @@ string t_sys_settings::about(bool html)
518 if (html) s += "<BR>";
521 - s += "* GNU CommonC++ - http://www.gnu.org/software/commoncpp";
522 + s += "* GNU uCommon C++ - http://www.gnutelephony.org/index.php/Category:Software";
523 if (html) s += "<BR><BR>";
526 Index: twinkle-1.4.2/src/timekeeper.cpp
527 ===================================================================
528 --- twinkle-1.4.2.orig/src/timekeeper.cpp 2009-01-18 15:45:26.000000000 +0100
529 +++ twinkle-1.4.2/src/timekeeper.cpp 2011-09-27 12:33:39.851913671 +0200
530 @@ -782,4 +782,5 @@ void *timekeeper_sigwait(void *arg) {
531 if (sigwait(&sigset, &sig) == EINTR) continue;
532 evq_timekeeper->interrupt();
536 Index: twinkle-1.4.2/src/user.cpp
537 ===================================================================
538 --- twinkle-1.4.2.orig/src/user.cpp 2009-02-24 21:33:16.000000000 +0100
539 +++ twinkle-1.4.2/src/user.cpp 2011-09-27 12:33:39.852913682 +0200
540 @@ -225,6 +225,7 @@ string t_user::bit_rate_type2str(t_bit_r
547 t_dtmf_transport t_user::str2dtmf_transport(const string &s) const {
548 @@ -244,6 +245,7 @@ string t_user::dtmf_transport2str(t_dtmf
555 t_g726_packing t_user::str2g726_packing(const string &s) const {
556 @@ -259,6 +261,7 @@ string t_user::g726_packing2str(t_g726_p
563 t_sip_transport t_user::str2sip_transport(const string &s) const {
564 @@ -276,6 +279,7 @@ string t_user::sip_transport2str(t_sip_t
571 string t_user::expand_filename(const string &filename) {
572 Index: twinkle-1.4.2/src/user.h
573 ===================================================================
574 --- twinkle-1.4.2.orig/src/user.h 2009-02-18 22:14:52.000000000 +0100
575 +++ twinkle-1.4.2/src/user.h 2011-09-27 12:33:39.853913692 +0200
580 -#include <cc++/config.h>
581 #include "protocol.h"
582 #include "sys_settings.h"
583 #include "audio/audio_codecs.h"
584 Index: twinkle-1.4.2/src/util.h
585 ===================================================================
586 --- twinkle-1.4.2.orig/src/util.h 2009-01-18 16:01:53.000000000 +0100
587 +++ twinkle-1.4.2/src/util.h 2011-09-27 12:33:39.853913692 +0200
592 -#include <cc++/config.h>
593 +#include <commoncpp/config.h>
597 Index: twinkle-1.4.2/src/gui/twinkle.pro
598 ===================================================================
599 --- twinkle-1.4.2.orig/src/gui/twinkle.pro 2009-02-25 21:14:55.000000000 +0100
600 +++ twinkle-1.4.2/src/gui/twinkle.pro 2011-09-27 12:33:51.309024215 +0200
601 @@ -3,7 +3,7 @@ LANGUAGE = C++
603 CONFIG += qt warn_on release thread
605 -LIBS += ../libtwinkle.a ../parser/libsipparser.a ../sdp/libsdpparser.a ../sockets/libsocket.a ../threads/libthread.a ../audio/libaudio.a ../audits/libaudits.a ../stun/libstun.a ../mwi/libmwi.a ../im/libim.a ../patterns/libpatterns.a ../presence/libpresence.a ../utils/libutils.a -lsndfile -lmagic -lncurses -lreadline
606 +LIBS += ../libtwinkle.a ../parser/libsipparser.a ../sdp/libsdpparser.a ../sockets/libsocket.a ../threads/libthread.a ../audio/libaudio.a ../audits/libaudits.a ../stun/libstun.a ../mwi/libmwi.a ../im/libim.a ../patterns/libpatterns.a ../presence/libpresence.a ../utils/libutils.a -lsndfile -lmagic -lncurses -lreadline -lkio