- Timestamp:
- Mar 18, 2006 12:26:55 PM (19 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/errno.c
r315 r330 26 26 * Message must be limited to 64 chars! 27 27 */ 28 #if defined(PJ_HAS_ERROR_STRING) && PJ_HAS_ERROR_STRING!=0 28 29 static const struct 29 30 { … … 48 49 { PJLIB_UTIL_EINXML, "Invalid XML message" }, 49 50 }; 50 51 #endif /* PJ_HAS_ERROR_STRING */ 51 52 52 53 … … 58 59 { 59 60 pj_str_t errstr; 61 62 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) 60 63 61 64 if (statcode >= PJLIB_UTIL_ERRNO_START && … … 97 100 } 98 101 102 #endif /* PJ_HAS_ERROR_STRING */ 103 104 99 105 /* Error not found. */ 100 106 errstr.ptr = buf; 101 107 errstr.slen = pj_ansi_snprintf(buf, bufsize, 102 "Unknown error %d",108 "Unknown pjlib-util error %d", 103 109 statcode); 104 110 -
pjproject/trunk/pjlib/src/pj/errno.c
r315 r330 40 40 41 41 /* PJLIB's own error codes/messages */ 42 #if defined(PJ_HAS_ERROR_STRING) && PJ_HAS_ERROR_STRING!=0 42 43 static const struct 43 44 { … … 63 64 { PJ_EEOF, "End of file" }, 64 65 }; 66 #endif /* PJ_HAS_ERROR_STRING */ 67 65 68 66 69 /* … … 71 74 static int pjlib_error(pj_status_t code, char *buf, pj_size_t size) 72 75 { 76 #if defined(PJ_HAS_ERROR_STRING) && PJ_HAS_ERROR_STRING!=0 73 77 unsigned i; 74 78 … … 82 86 } 83 87 } 88 #endif 84 89 85 *buf++ = '?'; 86 *buf++ = '?'; 87 *buf++ = '?'; 88 *buf++ = '\0'; 89 return 3; 90 return pj_ansi_snprintf( buf, size, "Unknown pjlib error %d", code); 90 91 } 91 92 -
pjproject/trunk/pjlib/src/pj/os_error_win32.c
r315 r330 34 34 * From Apache's APR: 35 35 */ 36 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING!=0) 37 36 38 static const struct { 37 39 pj_os_err_type code; … … 89 91 {0, NULL} 90 92 }; 93 94 #endif /* PJ_HAS_ERROR_STRING */ 95 91 96 92 97 … … 156 161 157 162 if (!len) { 163 164 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING!=0) 158 165 int i; 159 166 for (i = 0; gaErrorList[i].msg; ++i) { … … 168 175 } 169 176 } 177 #endif /* PJ_HAS_ERROR_STRING */ 170 178 171 179 } else { -
pjproject/trunk/pjmedia/src/pjmedia/errno.c
r321 r330 27 27 * Message must be limited to 64 chars! 28 28 */ 29 30 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) 31 29 32 static const struct 30 33 { … … 122 125 }; 123 126 127 #endif /* PJ_HAS_ERROR_STRING */ 128 124 129 125 130 … … 131 136 { 132 137 pj_str_t errstr; 138 139 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) 133 140 134 141 /* See if the error comes from PortAudio. */ … … 185 192 } 186 193 194 #endif /* PJ_HAS_ERROR_STRING */ 195 187 196 /* Error not found. */ 188 197 errstr.ptr = buf; 189 198 errstr.slen = pj_ansi_snprintf(buf, bufsize, 190 "Unknown error %d",199 "Unknown pjmedia error %d", 191 200 statcode); 192 201 -
pjproject/trunk/pjsip/src/pjsip-simple/errno.c
r315 r330 24 24 * Message must be limited to 64 chars! 25 25 */ 26 27 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) 28 26 29 static const struct 27 30 { … … 47 50 48 51 52 #endif /* PJ_HAS_ERROR_STRING */ 53 49 54 50 55 /* … … 55 60 { 56 61 pj_str_t errstr; 62 63 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) 57 64 58 65 if (statcode >= PJSIP_SIMPLE_ERRNO_START && … … 94 101 } 95 102 103 #endif /* PJ_HAS_ERROR_STRING */ 104 105 96 106 /* Error not found. */ 97 107 errstr.ptr = buf; 98 108 errstr.slen = pj_ansi_snprintf(buf, bufsize, 99 "Unknown error %d",109 "Unknown pjsip-simple error %d", 100 110 statcode); 101 111 -
pjproject/trunk/pjsip/src/pjsip/sip_errno.c
r315 r330 25 25 * MUST KEEP THIS ARRAY SORTED!! 26 26 */ 27 28 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) 29 27 30 static const struct 28 31 { … … 92 95 93 96 97 #endif /* PJ_HAS_ERROR_STRING */ 98 99 94 100 /* 95 101 * pjsip_strerror() … … 99 105 { 100 106 pj_str_t errstr; 107 108 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0) 101 109 102 110 if (statcode >= PJSIP_ERRNO_START && statcode < PJSIP_ERRNO_START+800) … … 145 153 return errstr; 146 154 147 } else { 148 /* Error not found. */ 149 errstr.ptr = buf; 150 errstr.slen = pj_ansi_snprintf(buf, bufsize, 151 "Unknown error %d", 152 statcode); 155 } 156 } 153 157 154 return errstr; 155 } 156 } 157 else { 158 /* Not our code. Give it to PJLIB. */ 159 return pj_strerror(statcode, buf, bufsize); 160 } 158 #endif /* PJ_HAS_ERROR_STRING */ 159 160 /* Error not found. */ 161 errstr.ptr = buf; 162 errstr.slen = pj_ansi_snprintf(buf, bufsize, 163 "Unknown pjsip error %d", 164 statcode); 165 166 return errstr; 161 167 162 168 }
Note: See TracChangeset
for help on using the changeset viewer.