Browse code

JUST FIXING

Bogdan-Andrei Iancu authored on 29/11/2001 14:01:52
Showing 3 changed files
... ...
@@ -255,7 +255,7 @@ int t_forward( struct sip_msg* p_msg , unsigned int dest_ip_param , unsigned int
255 255
       T->outbound_request[branch]->to.sin_addr.s_addr = ntohl( dest_ip ) ;
256 256
 
257 257
       if (add_branch_label( T, p_msg , branch )==-1) return -1;
258
-      buf = build_buf_from_sip_request  ( p_msg, &len);
258
+      buf = build_req_buf_from_sip_req( p_msg, &len);
259 259
       if (!buf)
260 260
          return -1;
261 261
       T->outbound_request[branch]->bufflen = len ;
... ...
@@ -264,7 +264,6 @@ int t_forward( struct sip_msg* p_msg , unsigned int dest_ip_param , unsigned int
264 264
       free( buf ) ;
265 265
    }/* end for the first time */
266 266
 
267
-
268 267
    /* sets and starts the RETRANS timer */
269 268
    T->outbound_request[branch]->nr_retrans    = 0;
270 269
    T->outbound_request[branch]->max_retrans = 
... ...
@@ -138,7 +138,7 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
138 138
 
139 139
 	line_buf=pkg_malloc(sizeof(char)*MAX_VIA_LINE_SIZE);
140 140
 	if (line_buf==0){
141
-		LOG(L_ERR, "ERROR: forward_request: out of memory\n");
141
+		LOG(L_ERR, "ERROR: build_req_buf_from_sip_req: out of memory\n");
142 142
 		goto error1;
143 143
 	}
144 144
 /*
... ...
@@ -179,14 +179,14 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
179 179
 				src[4]= ((struct cseq_body *)(msg->cseq->parsed))->number;
180 180
 
181 181
 				MDStringArray ( line_buf+via_len-1, src, 5 );
182
-				DBG("DEBUG: build_buf_from_sip_request: branch loop detection: %s, %s, %s, %s, %s -> %s32\n",
182
+				DBG("DEBUG: build_req_buf_from_sip_req: branch loop detection: %s, %s, %s, %s, %s -> %s32\n",
183 183
 					msg->from->body.s, msg->to->body.s, msg->callid->body.s, 
184 184
 					msg->first_line.u.request.uri.s,
185 185
 					((struct cseq_body *)(msg->cseq->parsed))->number.s,
186 186
 					line_buf+via_len-1 );
187 187
 				via_len+=MD5_LEN - 1;
188 188
 				
189
-			} else DBG("DEBUG: build_buf_from_sip_request: required HFs for loop checking missing\n");
189
+			} else DBG("DEBUG: build_req_buf_from_sip_req: required HFs for loop checking missing\n");
190 190
 		}
191 191
 		/* someone wants me to add something to branch here ? */
192 192
 		memcpy(line_buf+via_len, msg->add_to_branch.s, msg->add_to_branch.len );
... ...
@@ -196,7 +196,7 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
196 196
 		via_len+=CRLF_LEN;
197 197
 		line_buf[via_len]=0; /* null terminate the string*/
198 198
 	}else{
199
-		LOG(L_ERR, "forward_request: ERROR: via too long (%d)\n",
199
+		LOG(L_ERR, "build_req_buf_from_sip_req: ERROR: via too long (%d)\n",
200 200
 				via_len);
201 201
 		goto error1;
202 202
 	}
... ...
@@ -207,7 +207,7 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
207 207
 	if (check_address(source_ip, msg->via1->host.s, received_dns)!=0){
208 208
 		received_buf=pkg_malloc(sizeof(char)*MAX_RECEIVED_SIZE);
209 209
 		if (received_buf==0){
210
-			LOG(L_ERR, "ERROR: forward_request: out of memory\n");
210
+			LOG(L_ERR, "ERROR: build_req_buf_from_sip_req: out of memory\n");
211 211
 			goto error1;
212 212
 		}
213 213
 		/*
... ...
@@ -260,7 +260,7 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
260 260
 					break;
261 261
 				default:
262 262
 					/* only ADD allowed for before/after */
263
-					LOG(L_CRIT, "BUG:forward_request: invalid op for"
263
+					LOG(L_CRIT, "BUG:build_req_buf_from_sip_req: invalid op for"
264 264
 								" data lump (%x)\n", r->op);
265 265
 			}
266 266
 		}
... ...
@@ -289,7 +289,7 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
289 289
 				/* do nothing */
290 290
 				break;
291 291
 			debug:
292
-				LOG(L_CRIT,"BUG:forward_request: invalid"
292
+				LOG(L_CRIT,"BUG:build_req_buf_from_sip_req: invalid"
293 293
 							" op for data lump (%x)\n", r->op);
294 294
 		}
295 295
 		for (r=t->after;r;r=r->after){
... ...
@@ -299,7 +299,7 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
299 299
 					break;
300 300
 				default:
301 301
 					/* only ADD allowed for before/after */
302
-					LOG(L_CRIT, "BUG:forward_request: invalid"
302
+					LOG(L_CRIT, "BUG:build_req_buf_from_sip_req: invalid"
303 303
 								" op for data lump (%x)\n", r->op);
304 304
 			}
305 305
 		}
... ...
@@ -312,7 +312,7 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
312 312
 	}
313 313
 	new_buf=(char*)malloc(new_len+1);
314 314
 	if (new_buf==0){
315
-		LOG(L_ERR, "ERROR: forward_request: out of memory\n");
315
+		LOG(L_ERR, "ERROR: build_req_buf_from_sip_req: out of memory\n");
316 316
 		goto error;
317 317
 	}
318 318
 
... ...
@@ -343,7 +343,7 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
343 343
 							break;
344 344
 						default:
345 345
 							/* only ADD allowed for before/after */
346
-							LOG(L_CRIT, "BUG:forward_request: invalid op for"
346
+							LOG(L_CRIT, "BUG:build_req_buf_from_sip_req: invalid op for"
347 347
 									" data lump (%x)\n", r->op);
348 348
 
349 349
 					}
... ...
@@ -361,7 +361,7 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
361 361
 							break;
362 362
 						default:
363 363
 							/* only ADD allowed for before/after */
364
-							LOG(L_CRIT, "BUG:forward_request: invalid op for"
364
+							LOG(L_CRIT, "BUG:build_req_buf_from_sip_req: invalid op for"
365 365
 									" data lump (%x)\n", r->op);
366 366
 					}
367 367
 				}
... ...
@@ -392,7 +392,7 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
392 392
 							break;
393 393
 						default:
394 394
 							/* only ADD allowed for before/after */
395
-							LOG(L_CRIT, "BUG:forward_request: invalid op for"
395
+							LOG(L_CRIT, "BUG:build_req_buf_from_sip_req: invalid op for"
396 396
 									" data lump (%x)\n", r->op);
397 397
 
398 398
 					}
... ...
@@ -412,13 +412,13 @@ char * build_req_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_le
412 412
 							break;
413 413
 						default:
414 414
 							/* only ADD allowed for before/after */
415
-							LOG(L_CRIT, "BUG:forward_request: invalid op for"
415
+							LOG(L_CRIT, "BUG:build_req_buf_from_sip_req: invalid op for"
416 416
 									" data lump (%x)\n", r->op);
417 417
 					}
418 418
 				}
419 419
 				break;
420 420
 			default:
421
-					LOG(L_CRIT, "BUG: forward_request: unknown op (%x)\n",
421
+					LOG(L_CRIT, "BUG: build_req_buf_from_sip_req: unknown op (%x)\n",
422 422
 							t->op);
423 423
 		}
424 424
 	}
... ...
@@ -478,7 +478,7 @@ char * build_res_buf_from_sip_res(struct sip_msg* msg, unsigned int *returned_le
478 478
 	new_buf=(char*)malloc(new_len+1);/* +1 is for debugging
479 479
 											(\0 to print it )*/
480 480
 	if (new_buf==0){
481
-		LOG(L_ERR, "ERROR: forward_reply: out of memory\n");
481
+		LOG(L_ERR, "ERROR: build_res_buf_from_sip_res: out of memory\n");
482 482
 		goto error;
483 483
 	}
484 484
 	new_buf[new_len]=0; /* debug: print the message */
... ...
@@ -7,7 +7,7 @@ char * build_req_buf_from_sip_req  (struct sip_msg* msg, unsigned int *returned_
7 7
 
8 8
 char * build_res_buf_from_sip_res(struct sip_msg* msg, unsigned int *returned_len);
9 9
 
10
-char * build_res_buf_from_sip_req(struct sip_msg* msg, unsigned int *returned_len);
10
+char * build_res_buf_from_sip_req(unsigned int code , char *text , struct sip_msg* msg, unsigned int *returned_len);
11 11
 
12 12
 
13 13