Changeset 315 for pjproject/trunk
- Timestamp:
- Mar 10, 2006 12:57:12 PM (19 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 8 deleted
- 38 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/Makefile
r254 r315 16 16 exit 1; \ 17 17 fi; \ 18 fi \18 fi; \ 19 19 done 20 20 -
pjproject/trunk/pjlib-util/build
- Property svn:ignore
-
old new 5 5 *.suo 6 6 *.bsc 7 *vcproj* 8 *.sln
-
- Property svn:ignore
-
pjproject/trunk/pjlib-util/src/pjlib-util/errno.c
r264 r315 99 99 /* Error not found. */ 100 100 errstr.ptr = buf; 101 errstr.slen = pj_ snprintf(buf, bufsize,102 103 101 errstr.slen = pj_ansi_snprintf(buf, bufsize, 102 "Unknown error %d", 103 statcode); 104 104 105 105 return errstr; -
pjproject/trunk/pjlib/build
- Property svn:ignore
-
old new 7 7 *.plg 8 8 test*.txt 9 *.vcproj*
-
- Property svn:ignore
-
pjproject/trunk/pjlib/include/pj/compat/cc_msvc.h
r122 r315 34 34 #define PJ_CC_VER_3 0 35 35 36 /* Disable CRT deprecation warnings. */ 37 #if PJ_CC_VER_1 >= 8 38 # define _CRT_SECURE_NO_DEPRECATE 39 #endif 40 36 41 #pragma warning(disable: 4127) // conditional expression is constant 37 42 #pragma warning(disable: 4611) // not wise to mix setjmp with C++ -
pjproject/trunk/pjlib/include/pj/compat/string.h
r206 r315 27 27 28 28 #if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H != 0 29 # include <string.h>29 # include <string.h> 30 30 #else 31 31 … … 36 36 37 37 #if defined(_MSC_VER) 38 # define strcasecmp stricmp39 # if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=038 # include <stdio.h> 39 # define strcasecmp _stricmp 40 40 # define strncasecmp _strnicmp 41 # else 42 # define strncasecmp strnicmp 43 # endif 44 # define snprintf _snprintf 45 # define snwprintf _snwprintf 46 # define wcsicmp _wcsicmp 47 # define wcsnicmp _wcsnicmp 41 # define snprintf _snprintf 42 # define vsnprintf _vsnprintf 43 # define snwprintf _snwprintf 44 # define wcsicmp _wcsicmp 45 # define wcsnicmp _wcsnicmp 48 46 #else 49 # define stricmp strcasecmp50 # define strnicmp strncasecmp47 # define stricmp strcasecmp 48 # define strnicmp strncasecmp 51 49 52 # if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=053 # 54 # endif50 # if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 51 # error "Implement Unicode string functions" 52 # endif 55 53 #endif 56 57 54 58 55 #define pj_ansi_strcmp strcmp … … 60 57 #define pj_ansi_strlen strlen 61 58 #define pj_ansi_strcpy strcpy 59 #define pj_ansi_strncpy strncpy 62 60 #define pj_ansi_strcat strcat 63 61 #define pj_ansi_strstr strstr … … 69 67 #define pj_ansi_sprintf sprintf 70 68 #define pj_ansi_snprintf snprintf 69 #define pj_ansi_vsprintf vsprintf 70 #define pj_ansi_vsnprintf vsnprintf 71 71 72 72 #define pj_unicode_strcmp wcscmp … … 74 74 #define pj_unicode_strlen wcslen 75 75 #define pj_unicode_strcpy wcscpy 76 #define pj_unicode_strncpy wcsncpy 76 77 #define pj_unicode_strcat wcscat 77 78 #define pj_unicode_strstr wcsstr … … 83 84 #define pj_unicode_sprintf swprintf 84 85 #define pj_unicode_snprintf snwprintf 85 86 #define pj_unicode_vsprintf vswprintf 87 #define pj_unicode_vsnprintf vsnwprintf 86 88 87 89 #if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 … … 90 92 # define pj_native_strlen pj_unicode_strlen 91 93 # define pj_native_strcpy pj_unicode_strcpy 94 # define pj_native_strncpy pj_unicode_strncpy 92 95 # define pj_native_strcat pj_unicode_strcat 93 96 # define pj_native_strstr pj_unicode_strstr … … 99 102 # define pj_native_sprintf pj_unicode_sprintf 100 103 # define pj_native_snprintf pj_unicode_snprintf 104 # define pj_native_vsprintf pj_unicode_vsprintf 105 # define pj_native_vsnprintf pj_unicode_vsnprintf 101 106 #else 102 107 # define pj_native_strcmp pj_ansi_strcmp … … 104 109 # define pj_native_strlen pj_ansi_strlen 105 110 # define pj_native_strcpy pj_ansi_strcpy 111 # define pj_native_strncpy pj_ansi_strncpy 106 112 # define pj_native_strcat pj_ansi_strcat 107 113 # define pj_native_strstr pj_ansi_strstr … … 113 119 # define pj_native_sprintf pj_ansi_sprintf 114 120 # define pj_native_snprintf pj_ansi_snprintf 121 # define pj_native_vsprintf pj_ansi_vsprintf 122 # define pj_native_vsnprintf pj_ansi_vsnprintf 115 123 #endif 116 124 -
pjproject/trunk/pjlib/include/pj/string.h
r263 r315 27 27 #include <pj/types.h> 28 28 #include <pj/compat/string.h> 29 #include <pj/compat/sprintf.h>30 #include <pj/compat/vsprintf.h>31 29 32 30 -
pjproject/trunk/pjlib/src/pj/config.c
r307 r315 22 22 23 23 static const char *id = "config.c"; 24 const char *PJ_VERSION = "0.5.4 ";24 const char *PJ_VERSION = "0.5.4.1"; 25 25 26 26 PJ_DEF(void) pj_dump_config(void) -
pjproject/trunk/pjlib/src/pj/errno.c
r289 r315 20 20 #include <pj/string.h> 21 21 #include <pj/assert.h> 22 #include <pj/compat/sprintf.h>23 22 24 23 /* Prototype for platform specific error message, which will be defined … … 142 141 143 142 if (statcode < PJ_ERRNO_START + PJ_ERRNO_SPACE_SIZE) { 144 len = pj_ snprintf( buf, bufsize, "Unknown error %d", statcode);143 len = pj_ansi_snprintf( buf, bufsize, "Unknown error %d", statcode); 145 144 146 145 } else if (statcode < PJ_ERRNO_START_STATUS + PJ_ERRNO_SPACE_SIZE) { -
pjproject/trunk/pjlib/src/pj/log.c
r141 r315 21 21 #include <pj/string.h> 22 22 #include <pj/os.h> 23 #include <pj/compat/vsprintf.h>24 23 #include <pj/compat/stdarg.h> 25 24 … … 89 88 static const char *wdays[] = { "Sun", "Mon", "Tue", "Wed", 90 89 "Thu", "Fri", "Sat"}; 91 strcpy(pre, wdays[ptime.wday]);90 pj_ansi_strcpy(pre, wdays[ptime.wday]); 92 91 pre += 3; 93 92 } … … 138 137 139 138 /* Print the whole message to the string log_buffer. */ 140 print_len = vsnprintf(pre, sizeof(log_buffer)-len, format, marker); 139 print_len = pj_ansi_vsnprintf(pre, sizeof(log_buffer)-len, format, 140 marker); 141 141 if (print_len < 0) { 142 print_len = pj_ snprintf(pre, sizeof(log_buffer)-len,143 "<logging error: msg too long>");142 print_len = pj_ansi_snprintf(pre, sizeof(log_buffer)-len, 143 "<logging error: msg too long>"); 144 144 } 145 145 len = len + print_len; -
pjproject/trunk/pjlib/src/pj/os_core_win32.c
r304 r315 24 24 #include <pj/rand.h> 25 25 #include <pj/assert.h> 26 #include <pj/compat/vsprintf.h>27 #include <pj/compat/sprintf.h>28 26 #include <pj/errno.h> 29 27 #include <pj/except.h> … … 231 229 232 230 if (cstr_thread_name && pj_strlen(&thread_name) < sizeof(thread->obj_name)-1) 233 pj_ sprintf(thread->obj_name, cstr_thread_name, thread->idthread);231 pj_ansi_sprintf(thread->obj_name, cstr_thread_name, thread->idthread); 234 232 else 235 pj_ sprintf(thread->obj_name, "thr%p", (void*)thread->idthread);233 pj_ansi_sprintf(thread->obj_name, "thr%p", (void*)thread->idthread); 236 234 237 235 rc = pj_thread_local_set(thread_tls_id, thread); … … 310 308 311 309 if (strchr(thread_name, '%')) { 312 pj_ snprintf(rec->obj_name, PJ_MAX_OBJ_NAME, thread_name, rec);310 pj_ansi_snprintf(rec->obj_name, PJ_MAX_OBJ_NAME, thread_name, rec); 313 311 } else { 314 strncpy(rec->obj_name, thread_name, PJ_MAX_OBJ_NAME);312 pj_ansi_strncpy(rec->obj_name, thread_name, PJ_MAX_OBJ_NAME); 315 313 rec->obj_name[PJ_MAX_OBJ_NAME-1] = '\0'; 316 314 } … … 689 687 } 690 688 if (strchr(name, '%')) { 691 pj_ snprintf(mutex->obj_name, PJ_MAX_OBJ_NAME, name, mutex);689 pj_ansi_snprintf(mutex->obj_name, PJ_MAX_OBJ_NAME, name, mutex); 692 690 } else { 693 strncpy(mutex->obj_name, name, PJ_MAX_OBJ_NAME);691 pj_ansi_strncpy(mutex->obj_name, name, PJ_MAX_OBJ_NAME); 694 692 mutex->obj_name[PJ_MAX_OBJ_NAME-1] = '\0'; 695 693 } … … 1045 1043 } 1046 1044 if (strchr(name, '%')) { 1047 pj_ snprintf(sem->obj_name, PJ_MAX_OBJ_NAME, name, sem);1045 pj_ansi_snprintf(sem->obj_name, PJ_MAX_OBJ_NAME, name, sem); 1048 1046 } else { 1049 strncpy(sem->obj_name, name, PJ_MAX_OBJ_NAME);1047 pj_ansi_strncpy(sem->obj_name, name, PJ_MAX_OBJ_NAME); 1050 1048 sem->obj_name[PJ_MAX_OBJ_NAME-1] = '\0'; 1051 1049 } … … 1175 1173 } 1176 1174 if (strchr(name, '%')) { 1177 pj_ snprintf(event->obj_name, PJ_MAX_OBJ_NAME, name, event);1175 pj_ansi_snprintf(event->obj_name, PJ_MAX_OBJ_NAME, name, event); 1178 1176 } else { 1179 strncpy(event->obj_name, name, PJ_MAX_OBJ_NAME);1177 pj_ansi_strncpy(event->obj_name, name, PJ_MAX_OBJ_NAME); 1180 1178 event->obj_name[PJ_MAX_OBJ_NAME-1] = '\0'; 1181 1179 } -
pjproject/trunk/pjlib/src/pj/os_error_win32.c
r126 r315 20 20 #include <pj/assert.h> 21 21 #include <pj/compat/stdarg.h> 22 #include <pj/compat/sprintf.h>23 #include <pj/compat/vsprintf.h>24 22 #include <pj/unicode.h> 25 23 #include <pj/string.h> … … 180 178 181 179 if (!len) { 182 len = snprintf( buf, bufsize, "Unknown native error %u", (unsigned)os_errcode); 180 len = pj_ansi_snprintf( buf, bufsize, "Unknown native error %u", 181 (unsigned)os_errcode); 183 182 buf[len] = '\0'; 184 183 } -
pjproject/trunk/pjlib/src/pj/pool.c
r108 r315 22 22 #include <pj/assert.h> 23 23 #include <pj/os.h> 24 #include <pj/compat/sprintf.h>25 24 26 25 /* Include inline definitions when inlining is disabled. */ … … 149 148 if (name) { 150 149 if (strchr(name, '%') != NULL) { 151 sprintf(pool->obj_name, name, pool);150 pj_ansi_sprintf(pool->obj_name, name, pool); 152 151 } else { 153 strncpy(pool->obj_name, name, PJ_MAX_OBJ_NAME);152 pj_ansi_strncpy(pool->obj_name, name, PJ_MAX_OBJ_NAME); 154 153 } 155 154 } else { -
pjproject/trunk/pjlib/src/pjlib-test/main.c
r126 r315 22 22 #include <pj/sock.h> 23 23 #include <pj/log.h> 24 #include <stdio.h> 24 25 25 26 extern int param_echo_sock_type; -
pjproject/trunk/pjmedia/build
- Property svn:ignore
-
old new 3 3 .pjmedia* 4 4 *.plg 5 *.vcproj* 6 *.sln 7 *.suo
-
- Property svn:ignore
-
pjproject/trunk/pjmedia/src/pjmedia/errno.c
r222 r315 170 170 /* Error not found. */ 171 171 errstr.ptr = buf; 172 errstr.slen = pj_ snprintf(buf, bufsize,173 174 172 errstr.slen = pj_ansi_snprintf(buf, bufsize, 173 "Unknown error %d", 174 statcode); 175 175 176 176 return errstr; -
pjproject/trunk/pjmedia/src/pjmedia/sdp.c
r295 r315 291 291 /* Get the clock rate. */ 292 292 token.ptr = (char*)p; 293 while (p j_isdigit(*p) && p != end)293 while (p != end && pj_isdigit(*p)) 294 294 ++p; 295 295 token.slen = p - token.ptr; -
pjproject/trunk/pjsip-apps/build
- Property svn:ignore
-
old new 4 4 *.log 5 5 .* 6 *.sln 7 *.vcproj* 8 *.suo
-
- Property svn:ignore
-
pjproject/trunk/pjsip-apps/build/pjsip_perf.dsp
r262 r315 51 51 LINK32=link.exe 52 52 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 53 # ADD LINK32 netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"..\bin\pjsip-perf-i386-win32-vc6d.exe"53 # ADD LINK32 netapi32.lib mswsock.lib ws2_32.lib ole32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"..\bin\pjsip-perf-i386-win32-vc6d.exe" 54 54 55 55 !ELSEIF "$(CFG)" == "pjsip_perf - Win32 Debug" … … 75 75 LINK32=link.exe 76 76 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 77 # ADD LINK32 netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /profile /debug /machine:I386 /out:"..\bin\pjsip-perf-i386-win32-vc6d.exe"77 # ADD LINK32 netapi32.lib mswsock.lib ws2_32.lib ole32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /profile /debug /machine:I386 /out:"..\bin\pjsip-perf-i386-win32-vc6d.exe" 78 78 79 79 !ENDIF -
pjproject/trunk/pjsip-apps/build/pjsua.dsp
r254 r315 52 52 LINK32=link.exe 53 53 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 54 # ADD LINK32 dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /map /machine:I386 /out:"../bin/pjsua_vc6.exe" /fixed:no54 # ADD LINK32 dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib ole32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /map /machine:I386 /out:"../bin/pjsua_vc6.exe" /fixed:no 55 55 # SUBTRACT LINK32 /pdb:none /debug 56 56 … … 78 78 LINK32=link.exe 79 79 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 80 # ADD LINK32 dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/pjsua_vc6d.exe" /pdbtype:sept80 # ADD LINK32 dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib ole32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/pjsua_vc6d.exe" /pdbtype:sept 81 81 82 82 !ENDIF -
pjproject/trunk/pjsip-apps/src/pjsip-perf/main.c
r309 r315 21 21 #include <stdlib.h> /* atoi */ 22 22 23 //#define THIS_FILE "main.c"23 #define THIS_FILE "main.c" 24 24 25 25 pjsip_perf_settings settings; -
pjproject/trunk/pjsip-apps/src/pjsua/main.c
r301 r315 19 19 #include <pjsua-lib/pjsua.h> 20 20 #include <stdlib.h> /* atoi */ 21 21 #include <stdio.h> 22 22 23 23 #define THIS_FILE "main.c" … … 206 206 207 207 pjsip_regc_info info; 208 const pj_str_t *status_str; 208 209 209 210 pjsip_regc_get_info(pjsua.acc[acc_index].regc, &info); 210 211 211 pj_snprintf(reg_status, sizeof(reg_status), 212 "%s (%.*s;expires=%d)", 213 pjsip_get_status_text(pjsua.acc[acc_index].reg_last_code)->ptr, 214 (int)info.client_uri.slen, 215 info.client_uri.ptr, 216 info.next_reg); 212 status_str = pjsip_get_status_text(pjsua.acc[acc_index].reg_last_code); 213 pj_ansi_snprintf(reg_status, sizeof(reg_status), 214 "%s (%.*s;expires=%d)", 215 status_str->ptr, 216 (int)info.client_uri.slen, 217 info.client_uri.ptr, 218 info.next_reg); 217 219 218 220 } else { 219 pj_ sprintf(reg_status, "in progress (%d)",220 pjsua.acc[acc_index].reg_last_code);221 pj_ansi_sprintf(reg_status, "in progress (%d)", 222 pjsua.acc[acc_index].reg_last_code); 221 223 } 222 224 … … 386 388 char s[10]; 387 389 if (port_info->listener[j]) { 388 pj_ sprintf(s, "#%d ", j);390 pj_ansi_sprintf(s, "#%d ", j); 389 391 pj_ansi_strcat(txlist, s); 390 392 } -
pjproject/trunk/pjsip/build
- Property svn:ignore
-
old new 7 7 *.log 8 8 pjsip++.dsp 9 *.vcproj* 10 *.sln 11 *.suo
-
- Property svn:ignore
-
pjproject/trunk/pjsip/src/pjsip-simple/errno.c
r268 r315 96 96 /* Error not found. */ 97 97 errstr.ptr = buf; 98 errstr.slen = pj_ snprintf(buf, bufsize,99 100 98 errstr.slen = pj_ansi_snprintf(buf, bufsize, 99 "Unknown error %d", 100 statcode); 101 101 102 102 return errstr; -
pjproject/trunk/pjsip/src/pjsip-simple/evsub.c
r306 r315 667 667 668 668 /* Set name. */ 669 pj_ snprintf(sub->obj_name, PJ_ARRAY_SIZE(sub->obj_name),670 "evsub%p", sub);669 pj_ansi_snprintf(sub->obj_name, PJ_ARRAY_SIZE(sub->obj_name), 670 "evsub%p", sub); 671 671 672 672 -
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r283 r315 396 396 397 397 /* Object name will use the same dialog pointer. */ 398 pj_ snprintf(inv->obj_name, PJ_MAX_OBJ_NAME, "inv%p", dlg);398 pj_ansi_snprintf(inv->obj_name, PJ_MAX_OBJ_NAME, "inv%p", dlg); 399 399 400 400 /* Create negotiator if local_sdp is specified. */ … … 794 794 795 795 /* Object name will use the same dialog pointer. */ 796 pj_ snprintf(inv->obj_name, PJ_MAX_OBJ_NAME, "inv%p", dlg);796 pj_ansi_snprintf(inv->obj_name, PJ_MAX_OBJ_NAME, "inv%p", dlg); 797 797 798 798 /* Parse SDP in message body, if present. */ -
pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c
r141 r315 229 229 cred->qop = pjsip_AUTH_STR; 230 230 cred->nc.ptr = pj_pool_alloc(pool, 16); 231 pj_ snprintf(cred->nc.ptr, 16, "%06u", nc);231 pj_ansi_snprintf(cred->nc.ptr, 16, "%06u", nc); 232 232 233 233 if (cnonce && cnonce->slen) { -
pjproject/trunk/pjsip/src/pjsip/sip_dialog.c
r283 r315 74 74 75 75 dlg->pool = pool; 76 pj_ sprintf(dlg->obj_name, "dlg%p", dlg);76 pj_ansi_sprintf(dlg->obj_name, "dlg%p", dlg); 77 77 dlg->ua = ua; 78 78 dlg->endpt = endpt; -
pjproject/trunk/pjsip/src/pjsip/sip_endpoint.c
r253 r315 901 901 902 902 pj_ansi_strcpy(newformat, format); 903 pj_ snprintf(newformat+len, sizeof(newformat)-len-1,904 903 pj_ansi_snprintf(newformat+len, sizeof(newformat)-len-1, 904 ": [err %d] ", error_code); 905 905 len += pj_ansi_strlen(newformat+len); 906 906 907 errstr = pj sip_strerror(error_code, newformat+len,908 907 errstr = pj_strerror( error_code, newformat+len, 908 sizeof(newformat)-len-1); 909 909 910 910 len += errstr.slen; -
pjproject/trunk/pjsip/src/pjsip/sip_errno.c
r283 r315 148 148 /* Error not found. */ 149 149 errstr.ptr = buf; 150 errstr.slen = pj_ snprintf(buf, bufsize,151 152 150 errstr.slen = pj_ansi_snprintf(buf, bufsize, 151 "Unknown error %d", 152 statcode); 153 153 154 154 return errstr; -
pjproject/trunk/pjsip/src/pjsip/sip_msg.c
r266 r315 1716 1716 host->slen + 2 + /* host */ 1717 1717 text->slen + 2); /* text */ 1718 hvalue.slen = pj_ sprintf(hvalue.ptr, "%u %.*s \"%.*s\"",1719 1720 1718 hvalue.slen = pj_ansi_sprintf(hvalue.ptr, "%u %.*s \"%.*s\"", 1719 code, (int)host->slen, host->ptr, 1720 (int)text->slen, text->ptr); 1721 1721 1722 1722 return pjsip_generic_string_hdr_create(pool, &str_warning, &hvalue); -
pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
r253 r315 863 863 tsx->endpt = mod_tsx_layer.endpt; 864 864 865 pj_ sprintf(tsx->obj_name, "tsx%p", tsx);865 pj_ansi_sprintf(tsx->obj_name, "tsx%p", tsx); 866 866 867 867 tsx->handle_200resp = 1; -
pjproject/trunk/pjsip/src/pjsip/sip_transport.c
r230 r315 236 236 tdata->pool = pool; 237 237 tdata->mgr = mgr; 238 pj_ snprintf(tdata->obj_name, PJ_MAX_OBJ_NAME, "tdta%p", tdata);238 pj_ansi_snprintf(tdata->obj_name, PJ_MAX_OBJ_NAME, "tdta%p", tdata); 239 239 240 240 status = pj_atomic_create(tdata->pool, 0, &tdata->ref_cnt); … … 318 318 319 319 if (msg->type == PJSIP_REQUEST_MSG) { 320 len = pj_ snprintf(info_buf, sizeof(info_buf),321 "Request msg %.*s/cseq=%d (%s)",322 (int)msg->line.req.method.name.slen,323 msg->line.req.method.name.ptr,324 cseq->cseq, obj_name);320 len = pj_ansi_snprintf(info_buf, sizeof(info_buf), 321 "Request msg %.*s/cseq=%d (%s)", 322 (int)msg->line.req.method.name.slen, 323 msg->line.req.method.name.ptr, 324 cseq->cseq, obj_name); 325 325 } else { 326 len = pj_ snprintf(info_buf, sizeof(info_buf),327 "Response msg %d/%.*s/cseq=%d (%s)",328 msg->line.status.code,329 (int)cseq->method.name.slen,330 cseq->method.name.ptr,331 cseq->cseq, obj_name);326 len = pj_ansi_snprintf(info_buf, sizeof(info_buf), 327 "Response msg %d/%.*s/cseq=%d (%s)", 328 msg->line.status.code, 329 (int)cseq->method.name.slen, 330 cseq->method.name.ptr, 331 cseq->cseq, obj_name); 332 332 } 333 333 … … 368 368 369 369 pj_ansi_strcpy(obj_name, "rdata"); 370 pj_ sprintf(obj_name+5, "%p", rdata);370 pj_ansi_sprintf(obj_name+5, "%p", rdata); 371 371 372 372 rdata->msg_info.info = get_msg_info(rdata->tp_info.pool, obj_name, -
pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c
r184 r315 359 359 360 360 /* Initialize transport properties. */ 361 pj_ sprintf(loop->base.obj_name, "loop%p", loop);361 pj_ansi_sprintf(loop->base.obj_name, "loop%p", loop); 362 362 loop->base.pool = pool; 363 363 status = pj_atomic_create(pool, 0, &loop->base.ref_cnt); -
pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c
r261 r315 402 402 403 403 /* Object name. */ 404 pj_ sprintf(tp->base.obj_name, "udp%p", tp);404 pj_ansi_sprintf(tp->base.obj_name, "udp%p", tp); 405 405 406 406 /* Init reference counter. */ … … 446 446 /* Transport info. */ 447 447 tp->base.info = pj_pool_alloc(pool, 80); 448 pj_sprintf(tp->base.info, "udp %s:%d [published as %s:%d]", 449 pj_inet_ntoa(((pj_sockaddr_in*)&tp->base.local_addr)->sin_addr), 450 pj_ntohs(((pj_sockaddr_in*)&tp->base.local_addr)->sin_port), 451 tp->base.local_name.host.ptr, 452 tp->base.local_name.port); 448 pj_ansi_sprintf( 449 tp->base.info, "udp %s:%d [published as %s:%d]", 450 pj_inet_ntoa(((pj_sockaddr_in*)&tp->base.local_addr)->sin_addr), 451 pj_ntohs(((pj_sockaddr_in*)&tp->base.local_addr)->sin_port), 452 tp->base.local_name.host.ptr, 453 tp->base.local_name.port); 453 454 454 455 /* Set endpoint. */ -
pjproject/trunk/pjsip/src/pjsip/sip_ua_layer.c
r292 r315 766 766 userinfo[len] = '\0'; 767 767 768 len = pj_ snprintf(buf, size, "%s[%s] %s",769 770 768 len = pj_ansi_snprintf(buf, size, "%s[%s] %s", 769 title, 770 (dlg->state==PJSIP_DIALOG_STATE_NULL ? " - " : 771 771 "est"), 772 772 userinfo); -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r312 r315 897 897 898 898 /* With the user part. */ 899 len = pj_ snprintf(contact, sizeof(contact),899 len = pj_ansi_snprintf(contact, sizeof(contact), 900 900 "<sip:%.*s@%.*s:%d>", 901 901 (int)sip_uri->user.slen, … … 908 908 /* Without user part */ 909 909 910 len = pj_ snprintf(contact, sizeof(contact),910 len = pj_ansi_snprintf(contact, sizeof(contact), 911 911 "<sip:%.*s:%d>", 912 912 (int)udp_transport->local_name.host.slen, -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_settings.c
r312 r315 19 19 #include <pjsua-lib/pjsua.h> 20 20 #include <pjsua-lib/getopt.h> 21 #include <stdio.h> 21 22 22 23 /* … … 594 595 userinfo[len] = '\0'; 595 596 596 len = pj_ snprintf(buf, size, "%s[%s] %s",597 598 599 597 len = pj_ansi_snprintf(buf, size, "%s[%s] %s", 598 title, 599 pjsua_inv_state_names[inv->state], 600 userinfo); 600 601 if (len < 1 || len >= (int)size) { 601 602 pj_ansi_strcpy(buf, "<--uri too long-->");
Note: See TracChangeset
for help on using the changeset viewer.