- Timestamp:
- Jan 18, 2008 8:14:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/users/nanang/pjmedia/src/pjmedia/errno.c
r1700 r1710 24 24 #endif 25 25 26 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 27 pj_str_t srtp_transport_getliberrstr(int err); 28 #endif 26 29 27 30 … … 144 147 145 148 /* SRTP transport errors: */ 146 PJ_BUILD_ERR( PJMEDIA_SRTP_ESDPREQSECTP, "Secure transport required in SDP media descriptor" ), 147 PJ_BUILD_ERR( PJMEDIA_SRTP_ESDPAMBIGUEANS, "SDP contains ambigue answer" ), 148 149 PJ_BUILD_ERR( PJMEDIA_SRTP_ECRYPTONOTMATCH, "SRTP crypto-suite name not match the offerer tag" ), 150 PJ_BUILD_ERR( PJMEDIA_SRTP_EINKEYLEN, "Invalid SRTP key length for specific crypto" ), 151 PJ_BUILD_ERR( PJMEDIA_SRTP_ENOTSUPCRYPTO, "Unsupported SRTP crypto-suite" ), 152 PJ_BUILD_ERR( PJMEDIA_SRTP_ESDPAMBIGUEANS, "SRTP SDP contains ambigue answer" ), 153 PJ_BUILD_ERR( PJMEDIA_SRTP_ESDPDUPCRYPTOTAG,"Duplicated SRTP crypto tag" ), 154 PJ_BUILD_ERR( PJMEDIA_SRTP_ESDPINCRYPTO, "Invalid SRTP crypto attribute" ), 155 PJ_BUILD_ERR( PJMEDIA_SRTP_ESDPINCRYPTOTAG, "Invalid SRTP crypto tag" ), 156 PJ_BUILD_ERR( PJMEDIA_SRTP_ESDPINTRANSPORT, "Invalid SDP media transport for SRTP" ), 157 PJ_BUILD_ERR( PJMEDIA_SRTP_ESDPREQCRYPTO, "SRTP crypto attribute required in SDP" ), 158 PJ_BUILD_ERR( PJMEDIA_SRTP_ESDPREQSECTP, "Secure transport required in SDP media descriptor" ) 149 159 }; 150 160 … … 165 175 /* See if the error comes from PortAudio. */ 166 176 #if PJMEDIA_SOUND_IMPLEMENTATION==PJMEDIA_SOUND_PORTAUDIO_SOUND 167 if (statcode >= PJMEDIA_ ERRNO_FROM_PORTAUDIO(paNotInitialized)&&168 statcode < PJMEDIA_ERRNO_FROM_PORTAUDIO(paNotInitialized + 10000))177 if (statcode >= PJMEDIA_PORTAUDIO_ERRNO_START && 178 statcode <= PJMEDIA_PORTAUDIO_ERRNO_END) 169 179 { 170 180 171 int pa_err = statcode - PJMEDIA_ERRNO_FROM_PORTAUDIO(0); 181 //int pa_err = statcode - PJMEDIA_ERRNO_FROM_PORTAUDIO(0); 182 int pa_err = PJMEDIA_PORTAUDIO_ERRNO_START - statcode; 172 183 pj_str_t msg; 173 184 … … 181 192 } else 182 193 #endif /* PJMEDIA_SOUND_IMPLEMENTATION */ 194 195 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 196 /* LIBSRTP error */ 197 if (statcode >= PJMEDIA_LIBSRTP_ERRNO_START && 198 statcode < PJMEDIA_LIBSRTP_ERRNO_END) 199 { 200 int err = statcode - PJMEDIA_PORTAUDIO_ERRNO_START; 201 pj_str_t msg; 202 203 msg = srtp_transport_getliberrstr(err); 204 205 errstr.ptr = buf; 206 pj_strncpy_with_null(&errstr, &msg, bufsize); 207 return errstr; 208 209 } else 210 #endif 211 212 /* PJMEDIA error */ 183 213 if (statcode >= PJMEDIA_ERRNO_START && 184 statcode < PJMEDIA_ERRNO_ START + PJ_ERRNO_SPACE_SIZE)214 statcode < PJMEDIA_ERRNO_END) 185 215 { 186 216 /* Find the error in the table. … … 217 247 218 248 } 219 } 220 249 } 221 250 #endif /* PJ_HAS_ERROR_STRING */ 222 251
Note: See TracChangeset
for help on using the changeset viewer.