Change return code
Benjamin Renard

Benjamin Renard commited on 2014-02-12 17:37:35
Showing 1 changed files, with 4 additions and 3 deletions.

... ...
@@ -50,7 +50,8 @@ use constant {
50 50
 	EX_NOUSER => 67,
51 51
 	EX_NOHOST => 68,
52 52
 	EX_UNAVAILABLE => 69,
53
-	EX_SOFTWARE => 70
53
+	EX_SOFTWARE => 70,
54
+	EX_TEMPFAIL => 75
54 55
 };
55 56
 
56 57
 
... ...
@@ -86,7 +87,7 @@ if (not $mob =~ m/^[0-9]*$/) {
86 87
 if (defined $ARGV[1]) {
87 88
 	if (not $ARGV[1]=~ m/^[0-9\+]*$/) {
88 89
 		print "Invalid SMSC phone number : "+$ARGV[1];
89
-		exit EX_DATAERR;
90
+		exit EX_CONFIG;
90 91
 	}
91 92
 	$smsc=$ARGV[1];
92 93
 }
... ...
@@ -105,7 +106,7 @@ if (not $check_authorized_number or $mob ne '' && in_array(\@authorized_number,$
105 106
 	close(GNOKII);
106 107
 	if($? != 0){
107 108
 		print "Error sending SMS";
108
-		exit EX_SOFTWARE;
109
+		exit EX_TEMPFAIL;
109 110
 	}
110 111
 }
111 112
 else{
112 113