- Timestamp:
- Oct 23, 2013 5:34:48 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/types.cpp
r4608 r4631 45 45 } 46 46 47 string Error::info(bool multi_line) const 48 { 49 string output; 50 51 if (status==PJ_SUCCESS) { 52 output = "No error"; 53 } else if (!multi_line) { 54 char temp[80]; 55 56 if (!title.empty()) { 57 output += title + " error: "; 58 } 59 snprintf(temp, sizeof(temp), " (status=%d)", status); 60 output += reason + temp; 61 if (!srcFile.empty()) { 62 output += " ["; 63 output += srcFile; 64 snprintf(temp, sizeof(temp), ":%d]", srcLine); 65 output += temp; 66 } 67 } else { 68 char temp[80]; 69 70 if (!title.empty()) { 71 output += string("Title: ") + title + "\n"; 72 } 73 74 snprintf(temp, sizeof(temp), "%d\n", status); 75 output += string("Code: ") + temp; 76 output += string("Description: ") + reason + "\n"; 77 if (!srcFile.empty()) { 78 snprintf(temp, sizeof(temp), ":%d\n", srcLine); 79 output += string("Location: ") + srcFile + temp; 80 } 81 } 82 83 return output; 84 } 85 86 /////////////////////////////////////////////////////////////////////////////// 87 88 AuthCredInfo::AuthCredInfo() 89 : dataType(0) 90 { 91 } 92 93 AuthCredInfo::AuthCredInfo(const string ¶m_scheme, 94 const string ¶m_realm, 95 const string ¶m_user_name, 96 const int param_data_type, 97 const string param_data) 98 : scheme(param_scheme), realm(param_realm), username(param_user_name), 99 dataType(param_data_type), data(param_data) 100 { 101 } 102 47 103 48 104 ///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.