Changeset 109 for pjproject/trunk/pjsip/src/test-pjsip/txdata_test.c
- Timestamp:
- Jan 7, 2006 6:44:25 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test-pjsip/txdata_test.c
r107 r109 24 24 #define HFIND(msg,h,H) ((pjsip_##h##_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_##H, NULL)) 25 25 26 #define THIS_FILE "txdata_test.c" 27 28 26 29 /* 27 30 * This tests various core message creation functions. … … 51 54 /* Buffer must be invalid. */ 52 55 if (pjsip_tx_data_is_valid(invite) != 0) { 53 PJ_LOG(3,( "", " error: buffer must be invalid"));56 PJ_LOG(3,(THIS_FILE, " error: buffer must be invalid")); 54 57 return -14; 55 58 } 56 59 /* Reference counter must be set to 1. */ 57 60 if (pj_atomic_get(invite->ref_cnt) != 1) { 58 PJ_LOG(3,( "", " error: invalid reference counter"));61 PJ_LOG(3,(THIS_FILE, " error: invalid reference counter")); 59 62 return -15; 60 63 } … … 103 106 /* Buffer must be invalid. */ 104 107 if (pjsip_tx_data_is_valid(invite2) != 0) { 105 PJ_LOG(3,( "", " error: buffer must be invalid"));108 PJ_LOG(3,(THIS_FILE, " error: buffer must be invalid")); 106 109 return -34; 107 110 } 108 111 /* Reference counter must be set to 1. */ 109 112 if (pj_atomic_get(invite2->ref_cnt) != 1) { 110 PJ_LOG(3,( "", " error: invalid reference counter"));113 PJ_LOG(3,(THIS_FILE, " error: invalid reference counter")); 111 114 return -35; 112 115 } … … 142 145 /* Done checking invite2. We can delete this. */ 143 146 if (pjsip_tx_data_dec_ref(invite2) != PJSIP_EBUFDESTROYED) { 144 PJ_LOG(3,( "", " error: request buffer not destroyed!"));147 PJ_LOG(3,(THIS_FILE, " error: request buffer not destroyed!")); 145 148 return -49; 146 149 } … … 173 176 /* Buffer must be invalid. */ 174 177 if (pjsip_tx_data_is_valid(response) != 0) { 175 PJ_LOG(3,( "", " error: buffer must be invalid"));178 PJ_LOG(3,(THIS_FILE, " error: buffer must be invalid")); 176 179 return -54; 177 180 } 178 181 /* Check reference counter. */ 179 182 if (pj_atomic_get(response->ref_cnt) != 1) { 180 PJ_LOG(3,( "", " error: invalid ref count in response"));183 PJ_LOG(3,(THIS_FILE, " error: invalid ref count in response")); 181 184 return -55; 182 185 } … … 215 218 /* Buffer must be invalid. */ 216 219 if (pjsip_tx_data_is_valid(cancel) != 0) { 217 PJ_LOG(3,( "", " error: buffer must be invalid"));220 PJ_LOG(3,(THIS_FILE, " error: buffer must be invalid")); 218 221 return -84; 219 222 } 220 223 /* Check reference counter. */ 221 224 if (pj_atomic_get(cancel->ref_cnt) != 1) { 222 PJ_LOG(3,( "", " error: invalid ref count in CANCEL request"));225 PJ_LOG(3,(THIS_FILE, " error: invalid ref count in CANCEL request")); 223 226 return -85; 224 227 } … … 248 251 /* Done checking CANCEL request. */ 249 252 if (pjsip_tx_data_dec_ref(cancel) != PJSIP_EBUFDESTROYED) { 250 PJ_LOG(3,( "", " error: response buffer not destroyed!"));253 PJ_LOG(3,(THIS_FILE, " error: response buffer not destroyed!")); 251 254 return -99; 252 255 } … … 260 263 status = pjsip_endpt_create_ack( endpt, invite, &dummy_rdata, &ack ); 261 264 if (status != PJ_SUCCESS) { 262 PJ_LOG(3,( "", " error: unable to create ACK"));265 PJ_LOG(3,(THIS_FILE, " error: unable to create ACK")); 263 266 return -100; 264 267 } 265 268 /* Buffer must be invalid. */ 266 269 if (pjsip_tx_data_is_valid(ack) != 0) { 267 PJ_LOG(3,( "", " error: buffer must be invalid"));270 PJ_LOG(3,(THIS_FILE, " error: buffer must be invalid")); 268 271 return -104; 269 272 } 270 273 /* Check reference counter. */ 271 274 if (pj_atomic_get(ack->ref_cnt) != 1) { 272 PJ_LOG(3,( "", " error: invalid ref count in ACK request"));275 PJ_LOG(3,(THIS_FILE, " error: invalid ref count in ACK request")); 273 276 return -105; 274 277 } … … 299 302 /* Done checking invite message. */ 300 303 if (pjsip_tx_data_dec_ref(invite) != PJSIP_EBUFDESTROYED) { 301 PJ_LOG(3,( "", " error: response buffer not destroyed!"));304 PJ_LOG(3,(THIS_FILE, " error: response buffer not destroyed!")); 302 305 return -120; 303 306 } … … 305 308 /* Done checking response message. */ 306 309 if (pjsip_tx_data_dec_ref(response) != PJSIP_EBUFDESTROYED) { 307 PJ_LOG(3,( "", " error: response buffer not destroyed!"));310 PJ_LOG(3,(THIS_FILE, " error: response buffer not destroyed!")); 308 311 return -130; 309 312 } … … 311 314 /* Done checking ack message. */ 312 315 if (pjsip_tx_data_dec_ref(ack) != PJSIP_EBUFDESTROYED) { 313 PJ_LOG(3,( "", " error: response buffer not destroyed!"));316 PJ_LOG(3,(THIS_FILE, " error: response buffer not destroyed!")); 314 317 return -140; 315 318 }
Note: See TracChangeset
for help on using the changeset viewer.