Browse code

/* dont disclose lack of mem in release mode */

Jiri Kuthan authored on 01/09/2002 22:14:17
Showing 1 changed files
... ...
@@ -26,10 +26,6 @@ int err2reason_phrase(
26 26
 	char *error_txt;
27 27
 
28 28
 	switch( ser_error ) {
29
-		case E_OUT_OF_MEM:
30
-			error_txt="Excuse me I ran out of memory";
31
-			*sip_error=500;
32
-			break;
33 29
 		case E_SEND:
34 30
 			error_txt="Unfortunately error on sending to next hop occured";
35 31
 			*sip_error=-ser_error;
... ...
@@ -62,6 +58,13 @@ int err2reason_phrase(
62 62
 			error_txt="Forking capacity exceeded";
63 63
 			*sip_error=-E_BAD_SERVER;
64 64
 			break;
65
+		case E_OUT_OF_MEM:
66
+		/* dont disclose lack of mem in release mode */
67
+#ifdef DEBUG
68
+			error_txt="Excuse me I ran out of memory";
69
+			*sip_error=500;
70
+			break;
71
+#endif
65 72
 		default:
66 73
 			error_txt="I'm terribly sorry, server error occured";
67 74
 			*sip_error=500;