- Code was commented out in the previous pull request. (#3137).
- This has now been corrected.
... | ... |
@@ -94,28 +94,13 @@ void env_set_totag(struct cell *t, struct sip_msg *reply) |
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
int env_set_reason(struct sip_msg *reply, str *buff, int code) { |
97 |
-/* |
|
98 |
- int i; |
|
99 |
- char *p; |
|
100 |
-*/ |
|
97 |
+ |
|
101 | 98 |
if (reply!=FAKED_REPLY || !buff || !buff->s || buff->len < 20) |
102 | 99 |
return 0; |
103 | 100 |
if (strncmp(buff->s, "SIP/2.0 ", 8) != 0) { |
104 | 101 |
LM_ERR("not a SIP reply\n"); |
105 | 102 |
return 0; |
106 | 103 |
} |
107 |
-/* |
|
108 |
- p = buff->s + 12; |
|
109 |
- for (i=12;i<buff->len;i++) { |
|
110 |
- if (*p == '\r' || *p == '\n') { |
|
111 |
- acc_env.reason.s = buff->s+12; |
|
112 |
- acc_env.reason.len = i-12; |
|
113 |
- LM_DBG("reason[%.*s]\n", acc_env.reason.len, acc_env.reason.s); |
|
114 |
- return 1; |
|
115 |
- } |
|
116 |
- p++; |
|
117 |
- } |
|
118 |
-*/ |
|
119 | 104 |
|
120 | 105 |
/* Set the reason to a pointer in heap memory. It will contain the last seen FAKED_REPLY */ |
121 | 106 |
acc_env.reason.s = error_text(code); |